2.5.4.23 DateTime
The DateTime function converts a value to a date and time.
ABNF:
-
DateTime = val [val] sp ("1" / "2") ";DATETIME():129"
Required Arguments:
Name: DateTimeArg
Type: vAny
An argument that specifies a value representing a date and time.
Optional Arguments:
Type: vLanguageID
An argument that specifies an language code identifier (LCID) to use when parsing DateTimeArg.
Return Value:
If DateTimeArg is a PtgStr1, this function attempts to parse it using date and time format strings according to .NET globalization rules for Locale. If Locale is not specified, the LCID is specified by the DocumentLanguage field of the Properties GlobalElement in the App XML Part of the document. For more information about .NET globalization rules, see [MSDN-ENCLOC]. If the string is successfully parsed, the function returns a PtgDate containing the parsed date and time. If the string is not successfully parsed, the function returns a PtgErr with an error code of #VALUE!.
If DateTimeArg is not a PtgStr1, the function returns a PtgDate containing the value of DateTimeArg interpreted as a vDouble. If DateTimeArg cannot be interpreted as a vDouble, the function returns a PtgErr with an error code of #VALUE!.