Jump to content

Calculate Difference Between 2 Times


houssam_ballout

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...