Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

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