Andrea.Sterns
Andrea.Sterns

Reputation: 31

NetSuite saved search formula for today's date

I am new to NetSuite formula expressions used in saved searches and I am trying to return a text answer to when a custom field (which is a date) is less than today's date.

CASE WHEN ({custentity_fmg_date_tmp_exempt_expires}<(NOW())) THEN 'No' ELSE END

Upvotes: 3

Views: 27359

Answers (1)

vVinceth
vVinceth

Reputation: 915

NOW is not correct, {today} should be used.

Try this:

CASE WHEN ROUND({today} - {custentity_fmg_date_tmp_exempt_expires}) > 0 THEN 'No' ELSE 'Yes' END

Subtract the custom date field from date today to check if the custom date comes before the date today. If the difference is greater than zero then the custom date comes before today's date.

Upvotes: 6

Related Questions