summaryrefslogtreecommitdiff
path: root/fpcdocs/sysutex/ex19.pp
blob: e85c4995b7e776e1a51635116bf0060da01ecef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Program Example19;

{ This program demonstrates the StrToDate function }

Uses sysutils;

Procedure TestStr (S : String);

begin
  Writeln (S,' : ',DateToStr(StrToDate(S)));
end;

Begin

  Writeln ('ShortDateFormat ',ShortDateFormat);
  TestStr(DateTimeToStr(Date));
  TestStr('05'+DateSeparator+'05'+DateSeparator+'1999');
  TestStr('5'+DateSeparator+'5');
  TestStr('5');
End.