Calculate Date Difference in Saved Search if one of the Date is in Date/Time format

In saved searches, to calculate date difference we just need to use the Formula(Numeric) with formula
{datefield ID 1} – {datefield ID 2).

But if one of the date fields is in Date/time format, this formula will not work.

If date difference can not be calculated by this formula, use the following formula
Formula(Numeric) : ABS(TO_DATE({datefield ID 1}) – TO_DATE({datefield ID 2}))

For example, Need a saved search of Inbound shipments, with Expected Delivery Date within the last 7 days.
So used Formula(Numeric) – ABS(TO_DATE({today}) – TO_DATE({expecteddeliverydate})) less than or equal to 7

Leave a comment

Your email address will not be published. Required fields are marked *