Need the difference between two dates? No problem 😀

Use one of the following expressions. Trevor will calculate DATE_1 - DATE_2 and return an interval.

  • diff_in_seconds(DATE_1, DATE_2)
  • diff_in_days(DATE_1, DATE_2)
  • diff_in_weeks(DATE_1, DATE_2)
  • diff_in_months(DATE_1, DATE_2)
  • diff_in_years(DATE_1, DATE_2)

*You can also use now(), which returns the present time, as one of your dates.

🕑 Need to find the difference in minutes or hours? 

Using the diff_in_seconds function and dividing the result by 60 will give you the answer in minutes:

diff_in_seconds(DATE_1, DATE_2)/60

Dividing that result by 60 again will give you the result in hours:

diff_in_seconds(DATE_1, DATE_2)/60/60

---------

Have a question? 🧐

We're on standby to help! To chat with us, click the blue Intercom button in the bottom right of Trevor's interface.

Did this answer your question?