开发者

Month name in sql server 2008 [duplicate]

This question already has answers here: Clo开发者_开发知识库sed 12 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜