Format Date in GroupBy query
- From: "J" <J@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 16:13:02 -0700
What is the syntax for a query that will give me the Count of [PartID]
shipped each month. I think I need to do a Count on PK_ID and Group By the
DateShipped but how do I format the date. I tried using DateName but I can
only get it to work if I split out the Year and month. Thanks for the help.
The raw data looks like
PK_ID PartID DateShipped
1 KLP098A 2005-04-11 10:59:05
2 PLL907C 2005-04-12 10:43:03
3 LPK761F 2005-05-15 10:23:07
And I want the output to be
Month PartsShipped
Mar-2005 2
May-2005 1
.
- Follow-Ups:
- Re: Format Date in GroupBy query
- From: Hugo Kornelis
- Re: Format Date in GroupBy query
- Prev by Date: Re: cannot insert(urgent)
- Next by Date: Re: SQL 2000 licensing enquiry
- Previous by thread: Re: cannot insert(urgent)
- Next by thread: Re: Format Date in GroupBy query
- Index(es):
Relevant Pages
|
|