Possible Duplicate:
Convert Month Number to Month Name Function in SQL
Hi ....
how can i get month name by passing corresponding month number in sql server 2008 ..
thnks in advance....
SELECT DATENAME(month, <fieldname>) AS "Month Name" FROM <tablename>
Ex:
SELECT DATENAME(month, JoinDate) AS "Month Name" FROM EMPLOYEE
This value would return the monthname corresponding to the date value in the field JoinDate from the table EMPLOYEE
.
精彩评论