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
 


-----Oorspronkelijk bericht-----
Van: Michael Van Canneyt [mailto:[EMAIL PROTECTED] 
Verzonden: zondag 25 februari 2007 23:45
Aan: Jeff Steinkamp
CC: [email protected]
Onderwerp: Re: [lazarus] StrToDate error




On Sun, 25 Feb 2007, Jeff Steinkamp wrote:

> 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.

Delphi as of D7 has most routines in such a way that you can pass a set
of internationalization settings which it should use. (TFormatSettings
or so, I think it's called). FPC has the same in Subversion.

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

Reply via email to