StringToTime

Transforms the string containing time and/or date in the "yyyy.mm.dd [hh:mi]" format into the datetime type number.

datetime  StringToTime(
   const string  time_string      // date string
   );

Parameters

time_string

[in]  String in one of the specified formats:

  •  "yyyy.mm.dd [hh:mi]"
  •  "yyyy.mm.dd [hh:mi:ss]"
  •  "yyyymmdd [hh:mi:ss]"
  •  "yyyymmdd [hhmiss]"
  •  "yyyy/mm/dd [hh:mi:ss]"
  •  "yyyy-mm-dd [hh:mi:ss]"

Return Value

datetime type value containing the number of seconds elapsed since 01.01.1970.

Note

Any sequence of space and tabulation characters between date and time is considered to be a single space to avoid additional processing of the time_string before calling StringToTime().

See also

TimeToString, TimeToStruct