month part of Date

rschultz

Registered User.
Local time
Today, 03:34
Joined
Apr 25, 2001
Messages
96
I need to create a report that groups by the month portion of a Date field. I tried:
Left([DATEIN],2) in a query to see if I could get the month part out of it but I get a 'Datatype mismatch in criteria expression' error. Is there a way to do this so they can get the data separated by month?
 
Doesn't the report wizard give you the option of grouping. It should then enable you to group by month and will build the report for you without having to group by month in the underlying query. Unless you want to select specific Months.
HTH
 
but I don't have a 'month' field, I have a 'Date' field. So I think I have to break the month part of the date out of that field and group on that, but it's not letting me do it.
 
If its a genuine date field the wizard should give you a list of grouping options, inc. Monthly.
 
okay, here's the answer:
=Month([DateIN]) - then each group (grouped on the date field, which in this case is DATEIN, but it groups on the Month portion. The only problem is... it returns the number of the month i.e. 7 for July, 8 for August. Anyone know how to make the word appear rahter than the numeric?
 

Users who are viewing this thread

Back
Top Bottom