Discussion
Aaseya IT Services
SA
Last activity: 21 Apr 2021 5:45 EDT
Get Week Number from a given Date along with FromDate and To Date of the Week
To get the Week number from a given date. I have achieved this by the below steps.
1. Create a Data Type With FromDate (Date Only), ToDate (Date Only), WeekNumber, MonthName, Sno(PrimaryKey) columns.
2. Dump the excel sheet to Data type (Collected "List of Week Numbers of the current year" from google)
3. Create a table in the Section and give the source as Dpage.
4. Create a DataTransform / Activity.
5. Pass Month as Parameter to DPage. You can get Month Name by using the below function
@(Pega-RULES:DateTime).FormatDateTime(@(Pega-RULES:DateTime).CurrentDateTime(), "MMMMM", "", "")
6. Set Param.TodayDate (You can get Today Date by using the below function @getCurrentDateStamp())
7. Loop the DPage. Set the From Date and To Date as Params.
8. Check the When Condition as: Param.TodayDate>=Param.FromDate && Param.Todaydate<=Param.ToDate.
9. Check the Results in Screen.
For Details Steps please refer to this document attached below.
Thanks,
Srujan