Use the TIMESTAMPDIFF()
built-in function:
SELECT TIMESTAMPDIFF(MINUTE, my_datatime_col, now())
You may need to change the datetime values ββto get the correct sign (positive / negative) as a result if the column is before / after "now."
Bohemian
source share