Hello listers,
A strange error came up when formating a date. See this code:
writeln(formatdatetime('dd/mm/YYYY', now));
The answer should be: 31/01/2012
The answer was: 31-01-2012
I did one test else:
writeln(formatdatetime('dd$mm$YYYY', now));
The answer was: 31$01$2012
Yes, the problem seems to be related to the backslash.
DefaultFormatSettings.DateSeparator := '/';
writeln(formatdatetime('dd/mm/YYYY', now));
The answer was: 31/01/2012
Right! That's the answer. But it was necessary to setup the settings
manually.
The test was done with Freepascal 2.4.4 and Ubuntu 10.10.
Does someone know what is my mistake?
Regards,
Luciano
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal