Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ORDER BY Month(convert(varchar(9),(DateCreated))) DESC
how to convert in month value.
Posted

1 solution

Assuming DateCreated is of the type DateTime simply use
SQL
ORDER BY DATEPART(month, DateCreated) DESC

See DATEPART[^] for detailed description.
 
Share this answer
 
v2
Comments
rajjosh 6-Oct-11 2:41am    
DateCreated is column having varchar value

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