How to extract from OrderOpenTime()

To add comments, please log in or register
Alberto Tortella
793
Alberto Tortella  

Hi all, could you give me an help on how to extract the Hour number from OrderOpenTime() ?

I need to compare this to the Hour() function.

Thank you!

Marco vd Heijden
Moderator
11554
Marco vd Heijden  

Hello you can use 

TimeToStruct()
fxsaber
13242
fxsaber  
int OrderOpenHour = ((int)OrderOpenTime() / 3600) % 24;
Marco vd Heijden
Moderator
11554
Marco vd Heijden  

And if you only need the hour then you can also use 

int  hour=TimeHour(OrderOpenTime());
Alberto Tortella
793
Alberto Tortella  
Than you very much!
To add comments, please log in or register