Back to Devexpress

TextToDateEx(string,TDateTime,string) Method

vcl-cxdateutils-dot-texttodateex-x28-326406e8-x29.md

latest1.2 KB
Original Source

TextToDateEx(string,TDateTime,string) Method

Converts a string to the TDateTime type.

Declaration

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

Parameters

NameType
ATextstring
ADateTDateTime
AFormatStringstring

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

cxDateUtils Unit