> Michael Van Canneyt wrote: > > > > > > Or, if you need the values for some sort of calculation, you have to > > - find out the reference date, i. e. DateToStr(0) > - and the scale, (I think 1.0 = 1 day) > - consider the month lengths, with february changing in leap years > - for historic dates, consider calendar switches > > There's a conversion function somewhere on my hard disk. If I find it, > I'll post it later. > > Or you might scan the strings created by DateToStr. That'd be > quick-n-dirty, though :-)
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; _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal