kns25
04/29/2025, 5:12 AMCeligo AI
04/29/2025, 5:12 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you are trying to compare a date field with today's date in a NetSuite workflow. The issue you are facing might be due to the fact that you are trying to perform arithmetic operations on date fields directly. In NetSuite, date fields are treated as strings, so you cannot directly perform arithmetic operations on them. Instead, you should use the
TO_DATE
function to convert the date fields into a date format that can be used for arithmetic operations.
However, in your case, you are trying to compare a date field with today's date. The {today}
field in NetSuite is already a date field, so you don't need to convert it using TO_DATE
.
Here's a revised version of your formula:
CASE
WHEN ({today} - TO_DATE({duedate}, 'MM/DD/YYYY')) >= 45
THEN 'T'
ELSE 'F'
END
This formula converts the duedate
field into a date format using the TO_DATE
function, then subtracts it from today's date. If the result is greater than or equal to 45, it returns 'T', otherwise it returns 'F'.
Please note that the date format used in the TO_DATE
function ('MM/DD/YYYY') should match the format of your duedate
field.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/29/2025, 5:13 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.867521763
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.865582645
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.86068
Celigo AI
04/29/2025, 5:13 AM