TryConvertStrToDateTime(string,string,TDateTime) Method

Try parsing a string to a datetime value based on the specified format. Returns True if the input string matches the format.

Namespace: Spring.SystemUtils
function TryConvertStrToDateTime(const s, format: string; out value: TDateTime): Boolean;

Parameters

s
Type: string

the input string

format
Type: string

the format of datetime

value
Type: TDateTime

output datetime value

Return Value

Type: Boolean

Returns True if the input string can be parsed.