[fpc-pascal] Explicit date from double format

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Thu Sep 30 00:37:23 CEST 2004



On Wed, 29 Sep 2004, Jilani Khaldi wrote:

>  > Or, simpler, use DecodeDateTime function from DateUtils unit. It's 
> even Delphi-compatible. I'm not sure whether it exists in FPC 1.0.x 
> (even if not, it's probably
>  > possible to just compile DateUtils unit sources from FPC 1.9.4 using 
> FPC 1.0.10), but it exists in FPC 1.9.x for sure.
> I know I can use DecodeDateTime, but I am just curious about the 
> algorithm behind this conversion.

The TDateTime format is explained in the docs. It is a double:
- The integer part is the number of days since 00:00  1.1.1900 
- The fractional part is the number of milliseconds since 00:00 
  of the day divided by the total number of milliseconds in a day.

Michael.




More information about the fpc-pascal mailing list