Question2Replies1844Views×Close popoverAlfred Franklin (AlfredF4) Cognizant Cognizant IN View Profile AlfredF4 Member since 2016 1 post Cognizant Posted: May 19, 2017Last activity: May 22, 2017Posted: 19 May 2017 4:04 EDTLast activity: 22 May 2017 5:29 EDT Closed Calculate the Number Of DaysI have a requirement, that i need to send a mail two weeks before to the particular date.for an ex: if date is 31 may 2017, i need to send mail on 17 may 2017.can anyone suggest me on this.Thanks in Advance,Alfred Franklin.***Updated by moderator: Lochan to add Categories*** Case Management ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 3 years agoPosted: 19 May 2017 6:36 EDT×Close popoverMarc Alderman (Marc Alderman) PEGA Senior Software Solutions Engineer PEG GB View ProfileMarc Alderman PEGA replied to AlfredF4I have used the addToDate function to take 14 days away from a date property in my application. E.g. I used this syntax in a data transform to set the date 14 days before the .DateProperty. @DateTime.addToDate(.DateProperty,-14,0,0,0) Posted: 3 years agoPosted: 22 May 2017 5:29 EDT×Close popoverMohammad Asif Hasan (Asif Hasan) PEGA Senior Technical Solutions Engineer Pegasystems Inc. IN View ProfileAsif Hasan PEGA replied to AlfredF4You can use below function, to meet your requirement @(Pega-RULES:BusinessCalendar).addDays(<PROPERTY>, <Integer of days to add>, true (consider business calendar), OperatorID.pyCalendar (get operator calendar)) if passed from agent -- please pass OperatorID.pyCalendar as parameter. Refer this :- - https://pdn.pega.com/how-businesscalendar-functions-adddays-and-addtime-treat-holidays-weekends-and-time-zones Alternatively, I have found an article containing implementation details about addToDate function:-https://pdn.pega.com/community/pega-product-support/question/addtodate-param-info Function Def :- addToDate(theDate, days, hours, minutes, seconds) Kindly notify, if it helps.