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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping by Day of Week 1

Status
Not open for further replies.

leighmcmahon

Technical User
Apr 23, 2001
3
AU
Is it possible to group by the day of the week based on
a date column, and only have the day appear once.

i.e.

Monday
result
Tuesday
result
Wednesday
result
etc

I have tried grouping by the date column, and formatting the field to show
None for each of the dd, mm and yy sections. The result is

Monday
result
Tuesday
result
etc
Sunday
result
Monday
result
Tuesday
etc, repeated.


Thanks
leigh.
 
If you are using CR8 you can use the day of week function:
DayOfWeek ()

If you insert a date field inbetween the brackets using this function it will return 1 if the date falls on a Sunday, 2 if its a monday etc. You can then create an if statement to convert the number to the weekday and group on this formula, which should give you what you are looking for. Cheers

Marc
 
Have you tried using the formula ToText({datefield}, "dddd")? This will also return the day written out (Monday, Tuesday, etc). You can then group on this new field. You can also substitute "ddd" for the three character abbreviation of the day (Mon, Tue, etc).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top