1

How to total the minutes of the two dates? I mean I want to know the total minutes between from 2012-01-08 8:30 and 2012-01-09 14:11 using MySQL?

I have initiate_date and finalize_date columns in my table and I want to select them and display their total minutes.

kiritsuku
  • 52,967
  • 18
  • 114
  • 136
noob
  • 300
  • 5
  • 16

2 Answers2

8

I would suggest Timestamp difference

For example

TIMESTAMPDIFF(MINUTE, initiate_date, finalize_date)
Moseleyi
  • 2,585
  • 1
  • 24
  • 46
4
 SELECT (TIME_TO_SEC(end_time) - TIME_TO_SEC(start_time))/60 AS `minutes` 
Shahzad Barkati
  • 2,532
  • 6
  • 25
  • 33
Devendra
  • 1,864
  • 6
  • 29
  • 49