As time is "the number of seconds elapsed since January 01, 1970." (see reference just seach for datetime) you have to add 23 * 60 * 60 seconds to TimeCurrent()
Carl Schreiber:
As time is "the number of seconds elapsed since January 01, 1970." (see reference just seach for datetime) you have to add 23 * 60 * 60 seconds to TimeCurrent()
As time is "the number of seconds elapsed since January 01, 1970." (see reference just seach for datetime) you have to add 23 * 60 * 60 seconds to TimeCurrent()
That's the way to do it.
Thank you very much for your time.
Oh yes good point, thank you @nicholi shen , helpful as always,
appreciate your time.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello guys,
Adding and subtracting datetime value within a single day can be done without any problem but doing such calculations which leaks into next day or previous day give some erroneous results.
For Example I want to find out the time after adding TimeCurrent() + 23 hours, how to do it?
At the moment the way I do it is by making a date time struct out of the current time and adding hours into the structVariable.hour if it is greater than 23, adding 1 to the structVariable.day.
Is there an easy way to do this.
Also is there a way to convert between times, Day to Hours etc.
Thank you very much.