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.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives