And thus is the problem with trying to internationalize a software product where
data, in text format, can be passed back and forth easily.
The space character for a date separator is not part of the enumerated set. It is
'-' or '/' for the short date format.
With international correspondence, the official date format is usually DD MMM YYYY
when using English. But the short date format is one of the following:
DD-MM-YYYY
MM-DD-YYYY
YYYD-MM-DD
where the separator is a '-' or '/'.
To eliminate this problem in Windows and Delphi I normally read the DateSeperator
and ShortDateFormat and save them to a temporary variable, Change the separator to
a '/' and set the short date format to mm-dd-yyyy. Once the program exits, I
restore the DateSeperator and ShortDateFormat globals.
Jeff Steinkamp - N7YG
Tucson, AZ
SCUD Missile Coordinates
N32-13-55.01 W110-50-51.91
http://n7yg.net
http://home.earthlink.net/~jksteinkamp
Linux User #420428
Skype : jeff.steinkamp
_______________________________________________________
Beware the man who can't be bothered with details.
----- Original Message -----
From: "Michael Van Canneyt" <[EMAIL PROTECTED]>
To: <lazarus@miraclec.com>
Sent: Sunday, February 25, 2007 13:30
Subject: RE: [lazarus] StrToDate error
Except in Belgium, where the official date separator is a space,
so I'd get a string like '2007 02 27'.
You should always simply set the date separator char to the correct value.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives