trouble with dates/times

I’m trying to build a webpage that shows a table displaying time spent on a project (by date). I have 3 fields in MySQL: Date, Start Time, and End Time. I can build a page with php that connects to the MySQL database and then shows each date with the start and end times, but how can I get it to calculate/display the number of minutes spent each day as well as the total number of minutes overall? I can’t seem to get it to calculate the minutes…


What is the format of the data in the mysql database?

I have these 4 fields in my MySQL table (with the corresponding types): an autoincremented ID field (int), a Date field (date), a StartTime field (time), and an EndTime field (time).

Sponsor our Newsletter | Privacy Policy | Terms of Service