Have been using the formula numeric to compare two dates in NetSuite via saved search. This was required in purchase order update sync.This formula is used to check whether there are any latest updates on the purchase order. After the PO update sync we will set the updated date on custom date field.
The formula numeric :
ABS(TO_DATE({lastmodifieddate})-TO_DATE({customdate}))","greaterthanorequalto","0"]
This was working when two fields having value. If one of the fields is empty this will not result any value. Search will not work. In such cases we can use this formula instead.
ABS(NVL(TO_DATE({lastmodifieddate})-TO_DATE({customdate}),0))","greaterthanorequalto","0"],
These Blank values are in data terms a NULL value and they can become a problem when you are trying to get Calculations or counts of your data because a NULL value causes your formulas to fail. Luckily there is an simple enough fix for this. the NVL function. This function is used to detect a NULL value and replace it in your results with a more suitable value, in this case 0 (zero).