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

Date Grouping- BirthDates 2

Status
Not open for further replies.

Gizmo0917

Technical User
Dec 5, 2003
43
US
I have a date field for Employee BDays I would like to group them in a report by Month and day only. But since the year is included when I try to group by Month it groups it by month but also by year. How can I get it to ignore the year and just group it by the Month and Day only? I tried to create a formula that says Birthdate=(mm,dd) but it doesn't like that. Please help.

Thanks!
 
There are several ways to accomplish this.
Here is one way:
Create 2 Formulas:
@Month
Code:
Month({table.birthdate})
@Day
Code:
Day({table.birthdate})
Now create 2 groups; First 1 on Month, and the Second on Day.


~Brian
 
Or one group:

picture(totext(Month({table.birthdate})),"00")+picture(totext(day({table.birthdate})),"00")

Then you can use the regular date and format it however you like for display purposes.

-k
 
Thank you Very much let me see what I can do here! I will let you guys know how it turns out. Thanks again for the quick response.

Giz
 
Tried it the first way using the formula @month and it is grouping by the month but the month format is coming up as a number instead of Jan it comes up as 1.00. How do I fix this? otherwise it works.

Thanks!!
 
Instead of displaying your Group field on the report, place the birthdate field in that group header. You can than format it just to show the month name.

~Brian
 
Brian,
I did do it that way but since the year they were born is included in their Birthdate, when I did it this way it grouped it by the Mon and the day but also separated the months by year. What I want is to have all say Mar or whatever month and the days showing grouped together no matter what year.

Thanks
 
I combined your ideas and somehow I now have what I need. Thanks again for your help!!! Giz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top