Date and Time Arithmetic
How to add or subtract days or minutes from a MQL5 Time Structure ?
Convert to seconds then add or subtract . . . do you understand what a datetime type variable is ? look it up.
I dont think ur idea will work.
I dont think ur idea will work.
Maybe I misunderstood your question then, why will it not work ?
Assume the present date is Feb 28 and time is 23:00.
If I like to add 2 hours, it has to change all the three of hour part , day part and month part of datetime strucrure.
Leap year factor should also be taken into account.
converting into seconds won't do any purpose.
Assume the present date is Feb 28 and time is 23:00.
If I like to add 2 hours, it has to change all the three of hour part , day part and month part of datetime strucrure.
Leap year factor should also be taken into account.
converting into seconds won't do any purpose.