[fpc-pascal] DateTimeToFileDate
Carsten Bager
carsten at beas.dk
Sun Sep 14 07:42:12 CEST 2008
> Zitat von Carsten Bager <carsten at beas.dk>:
>
> > When I do this
> >
> > Free Pascal Compiler version 2.2.2 [2008/07/29] for i386
>
> Which OS?
Linux
>
> > ---------------------
> > Program tt;
> > uses dos,
> > sysutils;
> >
> > function strPackTime(t:longWord):shortstring;
> > var
> > dt:Datetime;
> > begin
> > UnpackTime(t,dt);
> > strPackTime:=intToStr(dt.day)+'/'+
> > intToStr(dt.month)+'-'+
> > intToStr(dt.year)+
> > intToStr(dt.hour)+':'+
> > intToStr(dt.min)+':'+
> > intToStr(dt.sec)+' ';
> > end;
> >
> > Begin
> > WriteLn(strPackTime(DateTimeToFileDate(now)));
> >
> > WriteLn(DateTimeToStr(FileDateToDateTime(DateTimeToFileDate(now))))
> > ;
> > End.
> > ---------------------------------
> >
> > I get this result
> >
> > 9/6-20160:28:22
> > 11-9-08 13:39:55
> >
> > What am I doing wrong.
>
>
> Mattias
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list