On Tue, 20 Oct 2009, Graeme Geldenhuys wrote:

Compiling the project works fine under FPC 2.3.1 (linux 64bit), but
running it, i get a EConvertError and I don't know why.

I am telling sysutils what LongDateFormat is like, but it still fails.
Any ideas?

It is documented:

1. StrToDate uses shortdateformat.

2. StrToDate DOES NOT use shortdateformat to check the actual format;
   because it accepts only dates of the form N1/N2/N3
   - it uses ShortDateFormat ONLY to determine the order of y,m,d
   - it uses DateSeparator to determine the actual date separator to use 
instead of /

You make a common assumption, which is mistaken:
StrToDate(DateToStr(date)) generally does not work.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to