TryISOStrToDateTime
Attempts to convert an ISO 8601-formatted date/time value to a TDateTime type
Declaration
Source position: dateutil.inc line 449
function TryISOStrToDateTime(const aString: string;
out outDateTime: TDateTime) : Boolean;
Description
TryISOStrToDateTime is a Boolean function which attempts to convert an ISO 8601-formatted date/time value to a TDateTime type. aString contains the date/time value examined in the routine, and can use one of the supported ISO 8601 notations. Internally, TryISOStrToDateTime separates the value in aString into date and time parts and calls both TryISOStrToDate and TryISOStrToTime.
outDateTime is a TDateTime output parameter where the date/time value is stored in the function.
The return value is True if aString is successfully parsed and converted to a TDateTime type. The return value is False if aString contains a value that cannot be parsed in the function. When the return value is False, outDateTime is set to 0 (representing an empty date/time value).
Use TryISOStrToDate or TryISOStrToTime to convert a string using only a date or a time value (respectively).
Use TryISO8601ToDate to convert a string value which uses more intricate forms of the ISO 8601 time notation.
See also
Name | Description |
---|---|
TryISO8601ToDate | Attempts to convert an ISO 8601-formatted date/time value to a TDateTime type |
TryISOStrToDate | Attempts to convert an ISO 8601-formatted date value to a TDateTime type |
TryISOStrToTime | Converts an ISO 8601-formatted time value to a TDateTime type |