Download MetaTrader 5

How to convert DateTime to integer

To add comments, please log in or register
Mohammad Ali
19973
Mohammad Ali 2014.02.07 06:40 

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
31164
Alain Verleyen 2014.02.07 08:57  
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