ConvertStrToDateTime(string,string) Method

Parses a string to a datetime value based on the specified format. An EConvertError exception will be raised if failed to parse the string.

Namespace: Spring.SystemUtils
function ConvertStrToDateTime(const s, format: string): TDateTime;

Parameters

s
Type: string

the date time string.

format
Type: string

the format of datetime.

Return Value

Type: TDateTime