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 the day name ?

Author  Topic 

eurob
Posting Yak Master

100 Posts

Posted - 2006-01-23 : 11:27:46
Is there a function that returns the name of the day, ex. Monday ?
I could only find the Day function that returns the day number.



robert

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-01-23 : 11:38:20
select datename(dw, getdate())

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2006-01-23 : 11:38:30
Try:

SELECT DATENAME(dw, GETDATE())
-- or
SELECT DATENAME(dw, 1)
Go to Top of Page

eurob
Posting Yak Master

100 Posts

Posted - 2006-01-23 : 12:49:34
Thanks, it worked.

robert
Go to Top of Page

pavelcc
Starting Member

2 Posts

Posted - 2010-09-24 : 11:33:41
SELECT DATENAME(DW,GETDATE()) + ' ' + DATENAME(MM,GETDATE()) + ' ' +DATENAME(YY, GETDATE())

-- RESULT SET AS (Friday September 2010)


Life is Good
Go to Top of Page
   

- Advertisement -