Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 how to get name of the day?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-12-02 : 08:18:44
Tushar writes "I wanna know how to get the name of the particular day from the select query:

select datePart (dw,getDate()).
it gives number for that day.
e.g. monday=1
tuesday =2 and so on but i need the day in words.
PlZ tell me ???"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-02 : 08:19:47
There's always the DateName() function:

SELECT DateName(dw, getdate())

Books Online actually has an entry comparing DatePart and DateName.
Go to Top of Page
   

- Advertisement -