DT_ParseDateTimeΒΆ
DT_ParseDateTime parses a date/time string and returns a real number.
- rmDateTime = DT_ParseDateTime(smDateTime)
Return Value
rmDateTime is a real matrix representing the date/time value. In case of an error the value is -1.0e6 (-1000000.0)
Parameters
- smDateTime
smDateTime is a string matrix with date/time strings. Examples:
"2013-12-31T23:59:59Z" (UTC ISO 8601) "2009-06-30T18:30:00+02:00" (UTC+2h) "2013-12-31T23:59:59.900Z" (UTC + 900/1000s) "25 January 1996" "8:30:00" "20:30:00" "January 25, 1996 8:30:00" (only for locale) "25. Januar 1996 8:30:00" (only for locale) "8:30:00 Jan. 25, 1996" "1/25/1996 8:30:00" (always specify the full year)
Comment
For more information about the DT_
-functions see DT_GetCurrentTime.
Example
* DT_SetLocale(0x0407) // German
* DT_ParseDateTime(["1.1.1998"; "24.12.2000"; "24.12.2000 18:00:00"])
35796.0000
36884.0000
36884.7500
* DT_ParseDateTime(["1.1.02"; "1.1.2002"])
37257.0000
37257.0000
History
Version |
Description |
---|---|
R2018.2 |
ISO 8601 time/date added. |
See also
Overview Date and Time, DT_Format, DT_GetCurrentTime, DT_SetLocale
id-834798