ex19.pp 332 B

1234567891011121314151617181920
  1. Program Example19;
  2. { This program demonstrates the StrToDate function }
  3. Uses sysutils;
  4. Procedure TestStr (S : String);
  5. begin
  6. Writeln (S,' : ',DateToStr(StrToDate(S)));
  7. end;
  8. Begin
  9. Writeln ('ShortDateFormat ',ShortDateFormat);
  10. TestStr(DateTimeToStr(Date));
  11. TestStr('05/05/1999');
  12. TestStr('5/5');
  13. TestStr('5');
  14. End.