开发者

Month name in sql server 2008 [duplicate]

开发者 https://www.devze.com 2023-01-27 14:46 出处:网络
This question already has answers here: Clo开发者_开发知识库sed 12 years ago. Possible 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

精彩评论

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