Skip to main content

TextToDateEx(string,TDateTime,string) Method

Converts a string to the TDateTime type.

Declaration

function TextToDateEx(AText: string; var ADate: TDateTime; const AFormatString: string = ''): Boolean;

Parameters

Name Type
AText string
ADate TDateTime
AFormatString string

Returns

Type
Boolean

Remarks

This function first calls the SmartTextToDate function and passes the AText parameter to it. If the SmartTextToDate function fails, the format dependant conversion of the AText parameter occurs. If the conversion fails, the TextToDateEx function returns False. Otherwise, the converted value is passed as the ADate parameter and the function returns True.

See Also