View Issue Details

IDProjectCategoryView StatusLast Update
0036922FPCLCLpublic2020-04-17 13:51
ReporterdevEric69 Assigned ToMichael Van Canneyt  
Status resolvedResolutionno change required 
Platform i386OSWindows 7 
Product Version3.0.4 
Summary0036922: The StrToDate function fails with some FormatSettings.ShortDateFormat.
Description(more info: GNU debugger GDB)

- The StrToDate function works well with a FormatSettings.ShortDateFormat='yyyy/mm/dd'.
- But the StrToDate function fails with a FormatSettings.ShortDateFormat='yyyyy-mm-dd'.

The documentation ( ) does not talk about restrictions on the characters that can be used, in FormatSettings.ShortDateFormat.
Steps To ReproduceA project to test and reproduce the error is attached.
TagsNo tags attached.
Fixed in Revision
Attached Files



2020-04-17 11:52

reporter (129,909 bytes)

Michael Van Canneyt

2020-04-17 13:51

administrator   ~0122193

You should not set shortdatestr to yyyy-mm-dd. Instead, set the dateseparator to '-'
shortdatestr is only used to determine the order, not the value of the date separator.
If you need more powerful string to date conversion, check this:

Issue History

Date Modified Username Field Change
2020-04-17 11:52 devEric69 New Issue
2020-04-17 11:52 devEric69 File Added:
2020-04-17 13:51 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-04-17 13:51 Michael Van Canneyt Status new => resolved
2020-04-17 13:51 Michael Van Canneyt Resolution open => no change required
2020-04-17 13:51 Michael Van Canneyt FPCTarget => -
2020-04-17 13:51 Michael Van Canneyt Note Added: 0122193