Please visit DEMANDDRAFT.SHOP for quality of products...

Ad

Search This Blog

Tuesday, July 17, 2012

DATENAME function in SQL Server

DATENAME()
 
This is used to find out the date name from the datetime value.

Example
SELECT DATENAME(dw, getdate()) AS 'Today'

Output:
Today
Tuesday

Exmaple:
SELECT DATENAME(month, getdate()) AS 'Month'

Output:
Month
July

Back

No comments:

Post a Comment