ex20.pp 362 B

1234567891011121314151617181920
  1. Program Example20;
  2. { This program demonstrates the StrToDateTime function }
  3. Uses sysutils;
  4. Procedure TestStr (S : String);
  5. begin
  6. Writeln (S,' : ',DateTimeToStr(StrToDateTime(S)));
  7. end;
  8. Begin
  9. Writeln ('ShortDateFormat ',ShortDateFormat);
  10. TestStr(DateTimeToStr(Now));
  11. TestStr('05-05-1999 15:50');
  12. TestStr('5-5 13:30');
  13. TestStr('5 1:30PM');
  14. End.