Netsuite compare 2 datetime in saved search criteria

Viewed 18

I would like to send an email if my URL is expired. For that, I have created a saved search and a custom transaction field.

My goal is to show the transaction record in the saved search, from the moment the date is expired.
I tried with formula date but it return only if the date is before today. But it can happen that we are the same day and that the url is expired for 1min or 1hour.
Ex: Today = 13/09/2022 3:00 pm and expiration date is 13/09/2022 2:59 pm
So I tried with Formula numeric to do:

{customfield} - {today} is less than 0

But Netsuite return an unknown error.
So I tried:

TO_CHAR((NVL({customfield},{today})-{today})) is less than zero

But it return this kind of value so it's always zero

+000000000 20:57:33.000000

or

-000000000 02:26:33.000000

or

+000000000 00:00:00.000000

How can I do to send an email when the DateTime from my custom field is in the past?

1 Answers

The formula type you select specifies the data type for the result returned. When you select "Formula (Date)" (formuladate) or "Formula (Date/Time)" (formuladatetime), NetSuite will convert the returned difference into a time interval formatted as a date or timestamp. For numerical comparison, use "Formula (Numeric)" (formulanumeric) instead.

Related