2.5.3.29 DateTime
The DateTime function converts a value to a date and time.
ABNF:
-
DateTime = "DATETIME(" val [ "," val ] ")"
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 a language code identifier (LCID) to use when parsing DateTimeArg. The default value is specified by the Language property, defined in [ISO/IEC29500-2:2012] section 11, from the Core XML part of a web drawing.
Return Value:
If DateTimeArg is a PtgString parse token, this function attempts to parse it using date and time format strings according to .NET globalization rules for Locale. For more information about .NET globalization rules, see [MSDN-ENCLOC]. If the string is successfully parsed, the function returns a PtgDate parse token containing the parsed date and time. If the string is not successfully parsed, the function returns a PtgErr parse token with an error code equal to #VALUE!.
If DateTimeArg is not a PtgString, the function returns a PtgDate containing the value of DateTimeArg interpreted as a type of vDouble. If DateTimeArg cannot be interpreted as a vDouble, the function returns a PtgErr with an error code equal to #VALUE!.