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?
- Automation: no more manual calculations or complex scripts.
- Accuracy: ideal for monitoring your SLAs or account velocity.
- 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! 👇