MQL4 Reference Conversion Functions StringToTime

StringToTime

The function converts a string containing time or date in "yyyy.mm.dd [hh:mi]" format into datetime type.

datetime  StringToTime(
   string  value      // date string
   );

Parameters

value

[in]  String in " yyyy.mm.dd hh:mi " format.

Return Value

Value of datetime type containing total number of seconds that elapsed since 01.01.1970.

Note

If a string contains time with no date, the execution result is a current date of a local PC with a specified time.