TimeMonth - Date and Time - MQL4 Reference

MQL4 Reference Date and Time TimeMonth

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());