Question
6
Replies
5975
Views
infosys
Posted: January 5, 2019
Last activity: January 10, 2019
Closed
Solved
Date functions
I have 2 properties StartDate and ExpectedDate of type Date&Time.If I give any date to the StartDate property then the ExpectedDate should be coming Monday 9AM.
For Example if StartDate=02/01/2019 4:50PM then ExpectedDate=07/01/2019 9AM(which is coming Monday)
StartDate=10/01/2019 3:45 PM then ExpectedDate=14/01/2019 9AM(which is coming Monday)
Please help me to solve this issue.
Hi
A high level algorithm to achieve this :
1. Get the current day for the Todays date. (Pega OOTB function can be used)
2. With that Day, find the number of days to add to get next Monday (ex: if Today is Tuesday, then next Monday would be 6th day after that). Since this value is fixed, you can use the Decision table for it,
3. Add that number of days to Current date. This should give you the next Monday.(Pega OOTB function can be used)
Hope it helps.
Regards
Bhavya