Add days to date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2019 02:31 AM
hi,
In Business Rule How can i add years/days to date .
I have tried like below
var createdDate = new GlideDateTime(attestationGR.sys_created_on);
var duedate = createdDate.addDays(365); //default 1 year
but it throws the below error. Please help me. I cannot use addLocaldays. how to go with adddaysUTC function to align time or another way ?
ERROR : Function addDays is not allowed in scope sn_hr_core. User either addDaysUTC() or addDaysLocalTime() instead
Thanks
JG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2019 02:53 AM
Hello,
Kindly go through below link it might be helpful
Mark correct or helpful if it helps you
Thanks,
Priti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2019 02:59 AM
Thank you so much. It helped me.
Thank you all for your quick replies.
JG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2019 03:05 AM
can you just mark helpful or correct
Thanks
Priti