Re: [fpc-pascal] Convert complicated string to DateTime

2009-03-04 Thread leledumbo
Gabor Boros wrote: > > But I defined LongMonthNames in a TFormatSettings type variable and > passed to ScanDateTime. > That's what you didn't tell us. I'm not sure either, perhaps a bug in ScanDateTime. This little program shows it (got EConvertError): uses SysUtils,DateUtils; var f: TFor

Re: [fpc-pascal] Convert complicated string to DateTime

2009-03-04 Thread Gabor Boros
leledumbo írta: What's the output of this: FormatDateTime(' dd hh:nn:ss ',Now); március 04 09:42:02 2009 that way you can understand what you should supply to ScanDateTime as the corresponding value for format. I mean, maybe it's not November, but something else equivalent in

Re: [fpc-pascal] Convert complicated string to DateTime

2009-03-04 Thread leledumbo
Gabor Boros wrote: > > And? I don't understand your suggestion. > What's the output of this: FormatDateTime(' dd hh:nn:ss ',Now); that way you can understand what you should supply to ScanDateTime as the corresponding value for format. I mean, maybe it's not November, but somethi

Re: [fpc-pascal] Convert complicated string to DateTime

2009-03-03 Thread Gabor Boros
And? I don't understand your suggestion. leledumbo írta: Gabor Boros wrote: Hi, I want to convert a string to a TDateTime variable. In example the string is: 'November 21 09:42:21 2008'. I tried ScanDateTime with ' dd hh:nn:ss ' pattern but not working. How can I convert this type of

Re: [fpc-pascal] Convert complicated string to DateTime

2009-03-03 Thread leledumbo
Gabor Boros wrote: > > Hi, > > I want to convert a string to a TDateTime variable. > In example the string is: 'November 21 09:42:21 2008'. > I tried ScanDateTime with ' dd hh:nn:ss ' pattern but not > working. How can I convert this type of string to DateTime? > ScanDateTime does the

[fpc-pascal] Convert complicated string to DateTime

2009-03-03 Thread Gabor Boros
Hi, I want to convert a string to a TDateTime variable. In example the string is: 'November 21 09:42:21 2008'. I tried ScanDateTime with ' dd hh:nn:ss ' pattern but not working. How can I convert this type of string to DateTime? Gabor ___ f