On Wed, 2006-06-07 at 17:13 +0200, 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.
That's what I said, as long as you use Delphi/fpc... But TDateTime isn't
a Borland-format but a Microsoft one. MS Access also uses it, and I
woudn't be surprised if more MS-components do.
But the ISO-format is more clear to third-party apps, that's for sure.
Joost.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives