how can I find the time (minutes) between 2 dates ...
# suiteql
s
how can I find the time (minutes) between 2 dates ? I tried : select DATEDIFF(minutes, current_date, created) from but it doesn't work. Any idea ?
m
if they're pure dates and not datetime fields you could find the difference in days and then multiply by the total number of minutes in a day SELECT transaction.startdate, transaction.enddate, transaction.enddate - transaction.startdate as day_difference, (transaction.enddate - transaction.startdate) *60*24 as time_difference, FROM transaction WHERE transaction.startdate IS NOT NULL AND transaction.enddate IS NOT NULL