TTMSFNCDataGridData.ValueToDateTime Method
Converts a cell value to a
TDateTimeusing the default format settings. Never raises an exception.
API unit family: TMSFNCDataGridData
Declaring type: TTMSFNCDataGridData
Overloads
Overload 1
Converts a cell value to a
TDateTimeusing the default format settings. Never raises an exception.
class function ValueToDateTime(AValue: TTMSFNCDataGridCellValue): TDateTime; overload;
__classmethod System::TDateTime __fastcall ValueToDateTime(const TTMSFNCDataGridCellValue &AValue)/* overload */;
Parameters
| Name | Description |
|---|---|
AValue |
Cell value to convert. |
Returns
The date/time; numbers are taken as serial date values, and 0 is returned for empty or unparsable values.
Overload 2
Converts a cell value to a
TDateTime, parsing text with the supplied format settings. Never raises an exception.
class function ValueToDateTime(AValue: TTMSFNCDataGridCellValue; AFormatSettings: TFormatSettings): TDateTime; overload;
__classmethod System::TDateTime __fastcall ValueToDateTime(const TTMSFNCDataGridCellValue &AValue, const System::Sysutils::TFormatSettings &AFormatSettings)/* overload */;
Remarks
Text is tried as a number first, then as a date/time, and, where supported, as an ISO 8601 date.
Parameters
| Name | Description |
|---|---|
AValue |
Cell value to convert. |
AFormatSettings |
Locale settings used to parse numeric and date text. |
Returns
The date/time, or 0 for empty or unparsable values.