Download MetaTrader 5

How to convert DateTime to integer

To add comments, please log in or register
Mohammad Ali
20003
Mohammad Ali  

When i write this code:

       int expire=0;
       if(Expiration>0)expire=TimeCurrent()+(Expiration*60)-5;

it show warning message : possible loss of data due to type conversion

How can i solve this problem.


Alain Verleyen
Moderator
31184
Alain Verleyen  
capilta:

When i write this code:

it show warning message : possible loss of data due to type conversion

How can i solve this problem.


datetime expire=0;
if(Expiration>0)expire=TimeCurrent()+(Expiration*60)-5;
To add comments, please log in or register