Quote:
|
Originally Posted by charliev
Hello everyone,
Arien't there any date/time functions to add and subtract (hours, minutes, seconds) to derive a new date/time?
For instance, if I wanted to add 360 minutes to a fixed date/time to get a future date/time how would I do it (without having to code the whole thing)?
Thanks for the help! All replies appreciated.
-charliev
|
charliev,
I don't see any problem adding hours minutes
seconds to time.
Take this examlpe:
PHP Code:
Alert("Current Time = " + TimeToStr(CurTime())+ " : Current Time + 60 Seconds = " + TimeToStr(CurTime()+60));
This code will add
1 minute to the current time.
As you can see you adding in
seconds
if you want to add 5 minutes you will use this code:
PHP Code:
Alert("Current Time = " + TimeToStr(CurTime())+ " : Current Time + 5 Minutes = " + TimeToStr(CurTime()+(60*5)));
I think there's no need to code a function for that, and I'm sorry if I misunderstand you.