10.6.3 AsDateTime
AsDateTime will return a datetime based on the value of the string and the specified format.
If the supplied value does not conform to the required format, the application will end with a run-time error. Use the IsDatetime intrinsic to test the value before attempting to convert to a datetime.
Input Parameters
Format - Datetime format expected in the numeric variable. Allowable formats are:
CCYYDDMMHHMMSS
CCYYMMDDHHMMSS
HHMMSSDDMMCCYY
HHMMSSDDMMYY
ISO
Localized_SQL
SQL
TZ
Example
If (#string.IsDateTime(ccyymmddhhmmss)
#Datetime := #string.AsDateTime(ccyymmddhhmmss)
else
* Error processing
Endif
Ý 10.6 Alphanumeric/String Intrinsic Functions