I'm developing a task management app for my workplace. I would like to be able to calculate how long it took from the task was made, until it was finished.
Pr now my app will log which date and what time (for instance: 2013-09-28 and 14:42) the task was created. It will then also log which date and time the task was marked as completed.
I know I can use MySQL DATEDIFF() to calculate the amount of days it took, but I'm wondering how I can calculate the rest (hours and minutes).
Basicly I want an output that says: "This task took 2 days, 4 hours and 30 minutes to complete."
Anyone have a suggestion for how I can do this?
Thanks in advance for your help.
Best regards, Simen