On Wednesday 07 June 2006 08:43, Michael Van Canneyt wrote:
> On Wed, 7 Jun 2006, Graeme Geldenhuys wrote:
> > On 6/7/06, Joost van der Sluis <[EMAIL PROTECTED]> wrote:
> >> > International ISO 8601 date time format and use a string field to
> >> > store the value.
> >> > http://www.cl.cam.ac.uk/~mgk25/iso-time.html
> >> >
> >> > For storage we use: yyyymmddThhmmss eg: 20060606T230300
> >> > For display we use: yyyy-mm-dd hh:mm:ss eg: 2006-06-06 23:03:00
> >>
> >> I should use a TDateTime, which is a float.
> >>
> >> Create the DB-fields as float's, store a TDateTime in it, and you're
> >> done. Works on all databases and has support for '0'.
> >>
> >> It's the same trick as you used, but you don't need to think of a
> >> localisation-format and you don't need any special conversion-units...
> >
> > Very clever, but I see one problem. 3rd Party tools will not be able
> > to figure out what the actual date is. Why Borland decided on
> > 1899-12-30 = 0 I have no idea, but that is only seen and known in
> > Delphi/FPC apps.
>
> This is not correct. It's a Microsoft "standard". You can observe
> it in VB/Access/Word/whatever M$ - applications just as well.
>
> Delphi uses it because you need it for Variant date/times and
> OleVariant conversions. Indeed, Variant itself is a Microsoft
> 'standard'.
>
> Michael.
Not that it is important but I wonder if the datetime actually started at a
hardware level. When I use to do such things I recall that the clock chip
provided a simple function call that returned datetime. And I think that
function is available for all clock chips. I could be wrong - because I'm
referring to programming 286/386 stuff.
John
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives