Finding the difference between two dates can be helpful for many workflows. Using the DATETIME_DIFF() function in the example below, we'll find the difference - in days - between two dates.
DATETIME_DIFF(
{Invoice Received},
{Invoice Billed},
'days'
)
Displaying in decimal format
In another example, if you need to measure the time an employee spent working each day, you could create two date field to track their clock in and clock out times. Using a DATETIME_DIFF() function like the following, you can display the total hours worked for the day.
DATETIME_DIFF({Clock Out},{Clock In},'minutes') / 60
Displaying in duration format
If you need to display this difference in duration format instead, you can make a small adjustment to your formula, using seconds instead of minutes, and removing / 60 from the end of the formula.
DATETIME_DIFF({Clock Out},{Clock In},'seconds')