Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Making date.parse work for user's time zone
There is a nice formula in SuiteAnswers which provides the number of days between two dates. The problem for me is that in the user interface we are entering dates in DD/MM/YYYY format and the formula assumes all dates are MM/DD/YYYY.
Here is the formula that I am using to set a field via Workflow.
(Date.parse({custbody_billing_period_to.id})-Date.parse({custbody_billing_period_from.id}))/86400000+1
So If I enter the following dates
5/4/2020 - 5/4/2020 that returns 1
increment by one Australian day
5/4/2020 - 6/4/2020 that returns 32 days
5 April - 6 April should be 1
it is interpreted as 4 May - 4 June= 32