Download MetaTrader 5

How to convert DateTime to integer

To add comments, please log in or register
Mohammad Ali
24171
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
33482
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