Alex Rivera | Logout

mysql get minutes between a datetime and NOW()

Asked 2012-01-15T11:44:24.890
10

I'm trying to calculate how many minutes have elapsed between a saved DateTime and NOW(), how can I accomplish this?

Edit
Report

1 Answer

12

Use this:

SELECT ROUND((UNIX_TIMESTAMP() - UNIX_TIMESTAMP(datetime_col)) / 60)
answered 2012-01-15T11:47:53.983

Your Answer