Category : Pascal Source Code
Archive   : MINIGEN.ZIP
Filename : CURDATE.INC

 
Output of file : CURDATE.INC contained in archive : MINIGEN.ZIP

{** Returns a date string from DOS in the format '99/99/99' **}

Type
MG_DAteStr = String[8];

Function CurrentDate : MG_DateStr;
Const
Space = ' ';
Var
Month,Day,Year,DayOfWeek : Word;
MStr,DStr : String[2];
YStr : String[4];

Begin
GetDate(Year,Month,Day,DayOfWeek);
Str(Month:2,MStr);
If MStr[1] = Space then
MStr[1] := '0';
Str(Day:2,DStr);
If DStr[1] = Space then
DStr[1] := '0';
Str(Year:2,YStr);
CurrentDate := Concat(MStr,'/',DStr,'/',Copy(YStr,3,2));
End; {CurrentDate}