[fpc-pascal] Explicit date from double format

Jilani Khaldi jilani.khaldi1 at virgilio.it
Wed Sep 29 23:54:14 CEST 2004


 >It's a lot simpler to use simply SysUtils.DecodeDate and DeccdeTime.

>Uses SysUtils;
>
>var Year, Month, Day, hour,minute,second,msec : word;
>
>begin
>  decodedate(trunc(thetdatetime),year,month,day);
>  decodetime(frac(thetdatetime),hour,minute,second,msec);
>end;
>  
>
Well, I want to use the double value as a key to control a session in a 
web application, then I want to be able to get the explicit date from 
this value. So the surfer when he/she sees the number couldn't 
understand its meaning ;-). How ever, even if I can get the same result 
using other hints, I am really curious to understand the algorithm (all 
the frac part!).
Thank you the same.

Jilani





More information about the fpc-pascal mailing list