https://netsuiteprofessionals.com logo
s

Simon

05/03/2022, 12:07 PM
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

Matt Bernstein

05/03/2022, 12:57 PM
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