Subtracting between timestamps
Posted: Mon Jul 11, 2005 2:02 pm
I have a script where I need to figure out the time between two timestamps in a database and I don't know how I should go about doing this.
So lets say:
$startTime = "2004-05-19 16:03:40" and $endTime = "2004-05-19 16:03:44"
How would I subtract startTime from endTime to get the total number of seconds in between.
It wont always be 4 seconds, it might be a few minutes too.
So lets say:
$startTime = "2004-05-19 16:03:40" and $endTime = "2004-05-19 16:03:44"
How would I subtract startTime from endTime to get the total number of seconds in between.
It wont always be 4 seconds, it might be a few minutes too.