Question
WIPRO
IN
Last activity: 28 Aug 2023 13:55 EDT
Finding Previous Business Working Day for a given date
Hi - I have to determine the previous working day for a given date. I dont see an OOTB function or PEGA API. I would like to use the PEGA business calendar. Any suggestions will be helpful.
Date I will be inputting is a future date and outcome expected is a previous working day. For example, if I input Jan 1 2024 (Monday) which is a New year holiday, I need to get 29th December 2023 (Friday) as output. Dec 30 2023 and Dec 31 2023 are weekends
Thanks
Mohan
@MOHANRAJS7274 please use the below solution. It will for you. Use -1 as number of days and it will consider business days of your business calendar being passed.
https://support.pega.com/question/how-add-given-days-number-date-using-only-business-days
@(Pega-RULES:BusinessCalender).addDays(.yourdatproperty, -1, true, OperatorID.pyCalender)