const Date : string
function StrToDate (
const Date : string; const FormatSettings : TFormatSettings
) : TDateTime;
The StrToDate function attempts to convert a date as a string Date into a TDateTime value.
The date string must adhere to the format of the ShortDateFormat value, and use the DateSeparator character to separate the day, month and year values.
The default format in the UK is day/month/year, where :
must be 1..31 (depending on month/year)
must be 1..12
must be 0..9999 (optional)
Omitting the year results in the use of the current year.
Note that year 0015, for example, must be given with the century digits; 15 on its own would be seen as a recent year.
If the year is 2 digits, the century is determined by the TwoDigitYearCenturyWindow value.
The time is set to 0 - the start of the specified day.
Any errors in the date string will yield EConvertError.
Version 2 of this function is for use within threads. You furnish the FormatSettings record before invoking the call. It takes a local copy of global formatting variables that make the routine thread safe.