By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,184 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,184 IT Pros & Developers. It's quick & easy.

Calculate time between 2 timestamps

P: n/a
Hi,

What's the easiest way in php to calculate the hour and minutes (HH:MM)
between 2 times? (unix timestamps)

thanks in advance!

Eric
Aug 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
What's the easiest way in php to calculate the hour and minutes (HH:MM)
between 2 times? (unix timestamps)
A Unix timestamp is in seconds. Subtract the two and you have the
difference between the two in seconds... Need more?

Aug 3 '06 #2

P: n/a

bobzimuta wrote:
What's the easiest way in php to calculate the hour and minutes (HH:MM)
between 2 times? (unix timestamps)

A Unix timestamp is in seconds. Subtract the two and you have the
difference between the two in seconds... Need more?
It would also be wise to take the absolute value, abs(), of the
subtraction in case of a negative result
-Blayde

Aug 3 '06 #3

P: n/a
Did you get it to work?

Aug 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.