Jonathan212
IS-IT--Management
I am using the following formula which is working correctly in the report.
Formula:
Local DateVar dt:= Date({vw_pcsAllBlocks.scheduledStart}) ;
Local NumberVar d ;
Local StringVar name ;
Local StringVar dy ;
Local StringVar suffix ;
d:=DateDiff ("ww",DateSerial(Year(dt),Month(dt),1-1) ,dt, DayOfWeek (dt) ) ;
dy := ToText(d,0,'') ;
name := WeekdayName (DayOfWeek (dt)) ;
suffix := (
select d
case 1 : "st"
case 2 : "nd"
case 3 : "rd"
case 4 to 7 : "th"
);
dy & suffix & " "& name & " in " & MonthName(Month(dt));
I am grouping by this formula and my results are sorting as 1st Friday in May, 1st Monday in May, 1st Thursday in May, 1st Tuesday in May, 1st Wednesday in May, etc. As you can see in alphabetical order.
Is there a way I could change the sort order so that it groups by 1st Monday in May, 1st Tuesday in May, 1st Wednesday in May, 1st Thursday in May, 1st Friday in May, etc.
I am using CR10.
Formula:
Local DateVar dt:= Date({vw_pcsAllBlocks.scheduledStart}) ;
Local NumberVar d ;
Local StringVar name ;
Local StringVar dy ;
Local StringVar suffix ;
d:=DateDiff ("ww",DateSerial(Year(dt),Month(dt),1-1) ,dt, DayOfWeek (dt) ) ;
dy := ToText(d,0,'') ;
name := WeekdayName (DayOfWeek (dt)) ;
suffix := (
select d
case 1 : "st"
case 2 : "nd"
case 3 : "rd"
case 4 to 7 : "th"
);
dy & suffix & " "& name & " in " & MonthName(Month(dt));
I am grouping by this formula and my results are sorting as 1st Friday in May, 1st Monday in May, 1st Thursday in May, 1st Tuesday in May, 1st Wednesday in May, etc. As you can see in alphabetical order.
Is there a way I could change the sort order so that it groups by 1st Monday in May, 1st Tuesday in May, 1st Wednesday in May, 1st Thursday in May, 1st Friday in May, etc.
I am using CR10.