I have two times entered into a form, a starting time and an ending time e.g, Start Time: 3:30, End Time: 5:15.

I enter these by hand, so I can enter them like 3.3 and 5.15 or however needed, but what I need to do is minus the end time from the start time to see how long I’ve worked so I can then see how much I’ve made per hour or whatnot…

so I would somehow need to be able to minus 3.3 from 5.15 and get the minute difference between the two(5:15-3:30, I would want to get 105 minute difference)

I’ve looked up strtotime, mktime, etc, but I have no idea how to get the minutes out of unix timestamps so any help would be greatly appreciated…

so record time() at the start and record time() at the end… that will give you the difference in seconds. To get the difference in minutes, just divide by 60.

I would be entering both at the same time, and would have to enter them manually because like otherwise I don’t know how to do it…I would be putting in the starting time, then playing a game for however long I played it, then I would get the ending time, so how would I get each seperately?

I’m getting some kind of problem with it…If I put in 2:15 and 6:30, I get 4 hours and 15 minutes(good to hear!) but if I put in 2:15 and 6:10, I get 4 hrs and 55 minutes, instead of 3 hrs and 55 minutes…