DateTimeToTextEx(TDateTime,Boolean,Boolean,Boolean) Method
Converts a TDateTime value to a string.
Declaration
function DateTimeToTextEx(const ADate: TDateTime; AIsMasked: Boolean; AIsDateTimeEdit: Boolean = False; AFourDigitYearNeeded: Boolean = False): string;
Parameters
Name | Type |
---|---|
ADate | TDateTime |
AIsMasked | Boolean |
AIsDateTimeEdit | Boolean |
AFourDigitYearNeeded | Boolean |
Returns
Type |
---|
string |
Remarks
The DateTimeToTextEx function converts a TDateTime value to a string. If the AIsMasked parameter is False, the function simply calls DateTimeToText, passes the ADate parameter to it and returns its result. If the AIsMasked parameter is True, the function performs the following steps:
Gets the ShortDateFormat value.
Corrects it to use in masked editor mode.
Makes up the date format based on the previous two steps.
Formats the ADate parameter value according to the format made up.
Returns the formatted human readable string containing a value of the ADate parameter.
See Also