To get the Week number from a given date. I have achieved this by the below steps.
-
Create a Data Type With FromDate (Date Only), ToDate (Date Only), WeekNumber, MonthName, Sno(PrimaryKey) columns.
-
Dump the excel sheet to Data type (Collected “List of Week Numbers of the current year” from google)
-
Create a table in the Section and give the source as Dpage.
-
Create a DataTransform / Activity.
-
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”, “”, “”)
-
Set Param.TodayDate (You can get Today Date by using the below function @getCurrentDateStamp())
-
Loop the DPage. Set the From Date and To Date as Params.
-
Check the When Condition as: Param.TodayDate>=Param.FromDate && Param.Todaydate<=Param.ToDate.
-
Check the Results in Screen.
For Details Steps please refer to this document attached below.
Thanks,
Srujan
Getting Week Number.docx (446 KB)
