MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Date & Time functions  TimeYear

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
int TimeYear( datetime time)
Returns year for the specified date. The returned value can be within the range of 1970 to 2037.
Parameters:
time   -   Datetime as number of seconds elapsed since midnight (00:00:00), January 1, 1970.
Sample:
  int y=TimeYear(TimeCurrent());