Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Date Field Where it gives all the Dates in a year . from this date I need to derive Weeks as per the requirement .
For Every month Starting week start will be starting day of the month and for other weeks it should consider as Monday.
Example : For the month of Jan & Feb Months :
Hi,
Try this.
Let vMin = Num(Makedate(2020,01,01));
Let vMax = num(Today());
Temp:
Load Date($(vMin)+RowNo()-1) as Date
AutoGenerate 1
While Date($(vMin)+RowNo()-1) <Date($(vMax));
Output:
Load Date,Weekstart(Date,0,0) as Weekstart,
If(Monthname(WeekStart(Date,0,0))<>Monthname(Date),Monthstart(Date),Weekstart(Date,0,0)) as New_WeekDay
Resident Temp;
Hi,
Try this.
Let vMin = Num(Makedate(2020,01,01));
Let vMax = num(Today());
Temp:
Load Date($(vMin)+RowNo()-1) as Date
AutoGenerate 1
While Date($(vMin)+RowNo()-1) <Date($(vMax));
Output:
Load Date,Weekstart(Date,0,0) as Weekstart,
If(Monthname(WeekStart(Date,0,0))<>Monthname(Date),Monthstart(Date),Weekstart(Date,0,0)) as New_WeekDay
Resident Temp;