Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

im my sqlserver database am saving date like : Tuesday, May 14, 2013... its a varchar datatype.....

i need to get full month name from this date like january,february.....

Please help me
Posted
Comments
ZurdoDev 29-Oct-13 13:12pm    
convert to datetime and then use MONTH()
Bernhard Hiller 30-Oct-13 3:20am    
That's a great idea! What about running it on a different locale, e.g. German: "Dienstag, 14. Mai 2013". And now think of a company with offices in many countries. Have fun!

1 solution

Try as below.
SQL
select datename(month, cast(COLUNM_NAME as datetime)) from TABLE_NAME;
 
Share this answer
 
v2

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