I didn't follow the full thread, so excuse me if this reply is out of context.
Have you guys ever considered using the International ISO 8601 date
format. See the following link for a summary:
{ Summary of ISO 8601 http://www.cl.cam.ac.uk/~mgk25/iso-time.html }
cIntlDateTimeStor = 'yyyymmdd"T"hhmmss'; // for storage
cIntlDateTimeDisp = 'yyyy-mm-dd hh:mm:ss'; // for display
I've also created a few helper functions that convert those date
formats to TDateTime, and the reverse.
function tiDateTimeAsIntlDateStor(const ADateTime: TDateTime): string;
function tiDateTimeAsIntlDateDisp(const ADateTime: TDateTime): string;
function tiIntlDateStorAsDateTime(const AValue: string): TDateTime;
function tiIntlDateDispAsDateTime(const AValue: string): TDateTime;
Once it's in a TDateTime, any GUI date/time edit component can do with
it as it pleases, though I still show it in the ISO display format.
Even for storing dates in a database, I don't use the DB's native
date/time types, I rather use the ISO storage format and a plain
string field. This way I always know the date formats and no
confusion with date/time delimiters and no confusion with the date
parts order d/m/y, y/md/, m/d/y, etc...
I've been using this in a production environment for over a year now
without any issues.
Regards,
- Graeme -
On 2/27/07, Pieter Valentijn <[EMAIL PROTECTED]> wrote:
I tend to have trouble with variants.
If I use this techniek and I store a date string in a variant it does
not want to convert to date.
So I want to stick to the sys locale and make sure i don't try to swim
upstream :-)
Met vriendelijke groet,
Pieter Valentijn
Delphidreams
http://www.delphidreams.nl
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives