Download MetaTrader 5

Libraries: Convert time to double and vice versa

To add comments, please log in or register
The Market has more than 400 indicators. Try any of them!
Automated-Trading
Admin
99101
Automated-Trading 2015.05.28 11:09 

Convert time to double and vice versa:

Library to convert datetime to double and vice versa.

Author: Aleksei Beliakov

Alain Verleyen
Moderator
30724
Alain Verleyen 2015.05.28 12:58  
What about the seconds ?
Aleksei Beliakov
23915
Aleksei Beliakov 2015.05.28 13:01  
Alain Verleyen:
What about the seconds ?
only minutes i used it to pass news time without seconds TIME_DATE|TME_MINUTES
Alain Verleyen
Moderator
30724
Alain Verleyen 2015.05.28 13:16  
Aleksei Beliakov:
only minutes i used it to pass news time without seconds TIME_DATE|TME_MINUTES

This library is pointless sorry.

   datetime now=TimeCurrent();

   GlobalVariableSet(name,now);
   datetime nowafter=(datetime)GlobalVariableGet(name);
Aleksei Beliakov
23915
Aleksei Beliakov 2015.05.28 13:44  
Alain Verleyen:

This library is pointless sorry.

As I answer you before I use it to pass date and time without seconds.
Roberto Jacobs
46438
Roberto Jacobs 2015.05.28 19:46  
Where the relevance to this library?
Aleksei Beliakov
23915
Aleksei Beliakov 2015.05.28 20:15  
3rjfx:
Where the relevance to this library?
i used it to save date + time without seconds in globalvariables
Alain Verleyen
Moderator
30724
Alain Verleyen 2015.05.28 20:57  
Aleksei Beliakov:
i used it to save date + time without seconds in globalvariables

Pointless. Save time without seconds:

   datetime now=TimeCurrent();
   now-=now%60;

   GlobalVariableSet(name,now);
   datetime nowafter=(datetime)GlobalVariableGet(name);
Aleksei Beliakov
23915
Aleksei Beliakov 2015.05.29 07:27  
Alain Verleyen:

Pointless. Save time without seconds:

thank you i doesn't knew that
Alain Verleyen
Moderator
30724
Alain Verleyen 2015.05.29 13:41  
Aleksei Beliakov:
thank you i doesn't knew that
You can always ask, that's why we have a forum
Aleksei Beliakov
23915
Aleksei Beliakov 2015.05.29 14:36  
Alain Verleyen:
You can always ask, that's why we have a forum
first of all i tried to save(by the same way as you) with second it's fails thats why i  thought it's impossible. any way thanks a lot, maybe some people read this and it's helps them
12
To add comments, please log in or register