Need to add 5 business days to a date field.

malaisamy1
Kilo Contributor

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

1 ACCEPTED SOLUTION

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.


View solution in original post

14 REPLIES 14

Hi Naik,



Its amazing.. It works perfectly fine.



Thank you so much.



Malaisamy J


On which table i am suppose to write this Business rule and it should run when??


Same table where you have to perform this operation, same where your date field is.


-Anurag

My date field is present on my catalog,it's a variable to be precise .


Check this out, you'll get the code here



Client Script Date/Time Functions


-Anurag