Add time(hh:mm:ss) to time(hh:mm:ss)
Posted: Thu Sep 03, 2009 4:31 pm
In an online course I operate I am trying to track a user's totalTime spent taking the course over multiple user sessions.
I can calculate the totalTime a user has spent during first session by subtracting timeStarted from timeEnded using PHP. I am able to get a totalTime in hh:mm:ss.
This time I can store in MySQL.
My problem arises when i try to add the time from first session (hh:mm:ss) to a total time from a second session (hh:mm:ss) using PHP. The answer will allow me to track cumulative time spent over multiple sessions.
Any suggestions of how to add time(hh:mm:ss) to time(hh:mm:ss) in PHP?
Any input is greatly appreciated.
Sean
I can calculate the totalTime a user has spent during first session by subtracting timeStarted from timeEnded using PHP. I am able to get a totalTime in hh:mm:ss.
This time I can store in MySQL.
My problem arises when i try to add the time from first session (hh:mm:ss) to a total time from a second session (hh:mm:ss) using PHP. The answer will allow me to track cumulative time spent over multiple sessions.
Any suggestions of how to add time(hh:mm:ss) to time(hh:mm:ss) in PHP?
Any input is greatly appreciated.
Sean