Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Group by month in Access Query


(!)

dee5782's Avatar
dee5782 dee5782 is offline
Junior Member with 11 posts.
THREAD STARTER
 
Join Date: Apr 2007
19-Apr-2007, 08:24 AM #1
Group by month in Access Query
See below the rough example of two columns of data pulled from a crosstab query which i am using. I'd like to group the dates by month for each number instead of having it list each day. Can i do this grouping in the query?

Ex: What i've got now

51351 12/1/2006
51351 12/3/2006
51351 1/4/2007
51351 1/16/2007
51333 12/1/2006
51333 12/3/2006
51333 12/4/2006
51333 1/17/2007
51333 1/18/2007


What i would like to get:

51351 12/2006
51351 1/2007
51333 12/2006
51333 1/2007

Thanks in advance for your help!
Ziggy1's Avatar
Computer Specs
Member with 2,525 posts.
 
Join Date: Jun 2002
Location: Ontario,Canada
Experience: Advanced
19-Apr-2007, 09:40 AM #2
Expr1: Format([YourDatefield],"m/yyyy")

or

Use the Month and YEAR functions

Expr1:Month(yourDatefield)

Expr2:YEAR(yourDatefield)
dee5782's Avatar
dee5782 dee5782 is offline
Junior Member with 11 posts.
THREAD STARTER
 
Join Date: Apr 2007
19-Apr-2007, 09:56 AM #3
Great, thanks!
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑