MQL4参考 日期和时间 TimeDay

TimeDay

Returns the day of month (1 - 31) of the specified date.

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

Parameters

date

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

Returned value

Day of month (1 - 31) of the specified date.

Example:

  int day=TimeDay(D'2003.12.31');
  // day is 31