home *** CD-ROM | disk | FTP | other *** search
- VAR TDate : String[6];
- ddate : string[8];
- PROCEDURE DOSDate;
- TYPE
- regpack = record
- ax,bx,cx,dx,bp,si,ds,es,flags: integer;
- end;
- VAR
- recpack: regpack; {record for MsDos call}
- month,day: string[2];
- year: string[4];
- dx,cx: integer;
- begin
- with recpack do
- begin
- ax := $2a shl 8;
- end;
- MsDos(recpack); { call function }
- with recpack do
- begin
- str(cx,year); {convert to string}
- str(dx mod 256,day); { " }
- str(dx shr 8,month); { " }
- end;
- Year:=Copy(Year,3,2);
- If Length(Month) = 1 then Month:='0'+Month;
- If Length(Day) = 1 then Day:='0'+Day;
- Tdate := year + month + day;
- ddate := month+'/'+day+'/'+year;
- end;
- begin
- dosdate;
- writeln(tdate);
- writeln(ddate);
- end.