[fpc-devel]How to get the milliseconds since January 1, 1900
Michael Van Canneyt
michael.vancanneyt at wisa.be
Mon Sep 6 10:33:44 CEST 2004
On Mon, 6 Sep 2004, Olle Raab wrote:
> 04-09-02 20.15, skrev Zhong Wang följande:
> > Hello, everybody
> > In Java and Java script, a date time can be
> > converted to the milliseconds since January 1, 1900,
> > and a long integer can be get. Is there a convenient
> > function in FPC to be compatible with Java and
> > TDateTime or TTimeStamp to the milliseconds since
> > January 1, 1900 in FPC sysutils library.
> Afaik TDateTime is number of days since a certain start year (dont know
> when). This should be easy to convert to nr of millisecond (guess you need
> 64 bit int for this). Since TDateTime is Double, it has decimals which
> describes the fraction of the day.
Check the dateutils unit, it contains routines to do this.
More information about the fpc-devel