Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Week of the month and sort order 1

Status
Not open for further replies.

Jonathan212

IS-IT--Management
Oct 22, 2002
57
US
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.
 
You can right click the group (Change Order) and change the sort order of the group to specific.


Thanks Whitebat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top