Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-05

strtodate on linux

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vannus

I've used strtodate to convert 01/02/2010 on windows ok, but it fails with 'Invalid date format' on linux.

anyone got any ideas why this happens?

- V

ABorka
to Vannus

I had a problem like this before.
If memory serves right, I had to set all four of these for StrToDate to work under Linux after moving some code from Windows:

     LongTimeFormat := 'hh:mm:ss';
     ShortDateFormat := 'YYYY/MM/DD';
     DateSeparator := '/';
     TimeSeparator := ':';

AB

Vannus wrote 12 lines
I've used strtodate to convert 01/02/2010 on windows ok, but it fails with 'Invalid date format' on linux. anyone got any ideas why this happens? - V _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Vannus
to ABorka

cheers - worked a treat :)

ABorka wrote 11 lines
I had a problem like this before. If memory serves right, I had to set all four of these for StrToDate to work under Linux after moving some code from Windows: LongTimeFormat := 'hh:mm:ss'; ShortDateFormat := 'YYYY/MM/DD'; DateSeparator := '/'; TimeSeparator := ':'; AB