Jump to content

Calculate Difference Between 2 Times


houssam_ballout
 Share

Recommended Posts

Hello I am php newbie, I am looking for a page that I can enter 2 times in 2 boxes and it will calculates for me the difference between them. The times to be entered will be in the form HH:MM.Any suggestion!Thanks
Turn the times into seconds (i.e. since midnight (or noon if you are using 12 hour clocks)) and do your subtraction, then turn it back into minutes, then hours. Or you could use some sort of trickery to get your times in unix timestamp instead of hh:mm..
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...