DATNAME() is an ANSI compliant, fast date part function built into SQL Server.
It accepts two arguments datepart and date. The datepart parameter specifies which part of the date to return - day, month, year with the function returning an nvarchar.
Syntax
DATENAME ( datepart ,date)
Example
SELECT DATENAME(m, GETDATE())
Result
January
0 comments:
Post a Comment