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.
That's the way to do it.
Thank you very much for your time.
You could also use the PeriodSeconds function.
my_time+= 23 * PeriodSeconds(PERIOD_H1);
Oh yes good point, thank you @nicholi shen , helpful as always,appreciate your time.