- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 12:45 AM
Hi Guys,
I have a scenario where i need to add 5 business days to a date field. while adding 5 days it has to exclude the Saturday and Sunday.
Note: This is a date field. not a date and time.
Is there any solution?.. Please help me on this.
Thanks in advance.
Malaisamy J
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 09:49 PM
Hi Malaisamy,
Please replace the line var issueStartDate = current.issueStartDate.getGlideObject(); with below:
var issueStartDate = new GlideDateTime(current.issue_start);
Let me know, if this helps.
Regards,
Prajakta
PS - Please mark Helpful, Like, or Correct Answer if applicable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 12:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 01:43 AM
Sorry guys,
Actually my requirement is,
we have two field, One is issue start date and another one is RCA due date.
for some condition,
RCA due date is 7 Business days from "Issue Start".
is there any solution for this scenario?
Thanks in advance.
Malaisamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 02:16 AM
This is what you need
http://wiki.servicenow.com/?title=GlideDateTime#addDays.28int.29
var gdt = new GlideDateTime("2011-08-31 08:00:00");
gdt.addDays(7);
gs.print(gdt.getDate());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2016 02:43 AM
Anurag,
while adding 7 days it has to exclude the Saturday and Sunday..
It has to add only business days.