From Clomosy Docs
function StrToDate(const Date string):TclDateTime;
The StrToDate function attempts to convert a date as a string S into a TclDateTime value.
The default format is day.month.year, where :
- The day must be 1..31 (depending on month/year)
- The month must be 1..12
- The year must be 0..9999 (optional)
Example
var
myDate : TclDate;
dateStr : String;
{
dateStr = '28.02.2023';
myDate = StrToDate(dateStr);
ShowMessage('Date = '+DateTimeToStr(myDate));
}
Output:
Date = 28.02.2023