Skip to main content

Mastering duration calculations with the DateDiff function

  • May 28, 2026
  • 0 replies
  • 3 views

josephinerohner
Community Manager
Forum|alt.badge.img+1

If you need to accurately calculate the gap between two key moments, the DateDiff function in the Expression processor is your best ally.

 

🔍 What is DateDiff?

It’s a date and time function that counts the number of units (days, hours, minutes, etc.) between two datetime expressions.

 

🛠️ How do you implement it?

In your Expression processor, the syntax usually follows this logic:

DateDiff(unit, start_date, end_date)

  • Unit: choose what you want to count ("day", "hour", "minute", etc.).
  • Start_date & End_date: the two datetime fields you want to compare.

 

📖 Concrete example

Imagine you want to calculate the age of an alert in days:

DateDiff("day", Alert_Created_Date, Current_Timestamp)

 

🌟 Why is it useful?

  1. Automation: no more manual calculations or complex scripts.
  2. Accuracy: ideal for monitoring your SLAs or account velocity.
  3. Reporting: lets you build powerful KPIs directly at the data source.

And you — what’s your favourite function in the Expression processor for saving time? Share your tips in the comments! 👇