Skip to content

Date and Time

Date and Time

This is the group of functions for working with data of datetime type (an integer that represents the number of seconds elapsed from 0 hours of January 1, 1970).

FunctionAction
TimeCurrentReturns the last known server time (time of the last quote receipt) in the datetime format
TimeTradeServerReturns the current calculation time of the trade server
TimeLocalReturns the local computer time in datetime format
TimeGMTReturns GMT in datetime format with the Daylight Saving Time by local time of the computer, where the client terminal is running
TimeDaylightSavingsReturns the sign of Daylight Saving Time switch
TimeGMTOffsetReturns the current difference between GMT time and the local computer time in seconds, taking into account DST switch
TimeToStructConverts a datetime value into a variable of MqlDateTime structure type
StructToTimeConverts a variable of MqlDateTime structure type into a datetime value
Last updated on