Problem with MQL5 MqlDateTime .mon

 

I get an error from the compiler when i use:

   MqlDateTime   .mon

   { 

   datetime date = D'2008.03.01'; 

   MqlDateTime tm;
   TimeToStruct(date,tm);
   int day = tm.day;
   Print(day);
   }
   //Above works and results in 1
   
   {
   datetime date = D'2008.03.01'; 
   MqlDateTime tm;
   TimeToStruct(date,tm);
   int month = tm.mon;
   Print(month);
   }
   //With .mon instead of .day 
   // I get
   // '1' - syntax error 
   // from the compiler
   // Please, is there somebody who knows whats is going on here....
 
kilesa :

Am o eroare de la compilator când folosesc:

   MqlDateTime    .mon

   { 

   datetime date = D'2008.03.01 "; 

   MqlDateTime tm;
   TimeToStruct (date, tm);
   int day = tm.day;
   Imprimare (zi);
   }
   // Lucrări de mai sus și rezultate în 1
   
   {
   datetime date = D'2008.03.01 "; 
   MqlDateTime tm;
   TimeToStruct (date, tm);
   int luna = tm.mon;
   Imprimare (luni);
   }   }
   // Cu .mon în loc de zi 
   // Eu iau
   // '1' - eroare de sintaxă 
   // de la compilator
   // Vă rog, este cineva care știe ce se întâmplă aici ...
 
Tudorel22:

I don't understand this.

I see several languages.

Something like spanisch.

But the syntax is change