MQL4 Reference Date and Time TimeMonth

MQL4 Help as One File:

TimeMonth

Returns the month number of the specified time.

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

Parameters

date

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

Returned value

Month number (1-January,2,3,4,5,6,7,8,9,10,11,12) of the specified time.

Example:

  int m=TimeMonth(TimeCurrent());