Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have stored dates in a table and i want to group it by months while i didn't store months in a table is it possible if its then how?
Posted
Comments
duke90 19-Apr-14 2:50am    
I itself got an answer...
karthik Udhayakumar 19-Apr-14 3:06am    
Hey Duke,
If you got the answer post it down ,so it would be useful for other searchers looking for the same solution :)

1 solution

try this

select count(YourColumnName) from yourTable group by datepart(MM,YourColumnName)
 
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