You could use unix_timestamp
for dates after 1970
:
SELECT
(unix_timestamp('2013-01-01 10:10:10') - unix_timestamp('1970-01-01 00:00:00'))/60
- Convert both dates to seconds from
1970-01-01
- Substract them
- Divide by 60 to get minutes
for example: if your start_time is 2017-09-14 23:35:53 and end_time is 2017-09-14 23:35:53
you can use (unix_timestamp(
end_time)-unix_timestamp(
start_time))/60 the result is stamp diff
from Thupdi Fei Joe