Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
Sorry to Christian...
I want to group date from DB in month..I have data since yr 2007.How do i proceed?

Awaiting a response ASAP

Many Thanks

Shaheen
Posted
Updated 26-Apr-10 2:31am
v2

You can use the month function.

SQL
SELECT *
  FROM [Table Name]
ORDER BY MONTH([Date Column Name])
 
Share this answer
 
Group by Year, then by Month.

SQL
select year([date_column]), month([date_column]), count('')
  from [table_name]
 group by year([date_column]), month([date_column])
 order by 1 desc, 2 desc
;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900