MQL4 Reference Date and Time TimeHour

MQL4 Help as One File:

TimeHour

Returns the hour of the specified time.

int  TimeHour(
   datetime      date            // date and time
   );

Parameters

date

[in]  Datetime is the number of seconds elapsed since midnight (00:00:00), January 1, 1970.

Returned value

Hour of the specified time.

Example:

  int h=TimeHour(TimeCurrent());