SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to get the day name ?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

eurob
Posting Yak Master

USA
100 Posts

Posted - 01/23/2006 :  11:27:46  Show Profile  Visit eurob's Homepage  Send eurob an ICQ Message  Reply with Quote
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

Slovenia
11749 Posts

Posted - 01/23/2006 :  11:38:20  Show Profile  Visit spirit1's Homepage  Reply with Quote
select datename(dw, getdate())

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

Lamprey
Flowing Fount of Yak Knowledge

4354 Posts

Posted - 01/23/2006 :  11:38:30  Show Profile  Reply with Quote
Try:

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

eurob
Posting Yak Master

USA
100 Posts

Posted - 01/23/2006 :  12:49:34  Show Profile  Visit eurob's Homepage  Send eurob an ICQ Message  Reply with Quote
Thanks, it worked.

robert
Go to Top of Page

pavelcc
Starting Member

USA
1 Posts

Posted - 09/24/2010 :  11:33:41  Show Profile  Click to see pavelcc's MSN Messenger address  Send pavelcc a Yahoo! Message  Reply with Quote
SELECT DATENAME(DW,GETDATE()) + ' ' + DATENAME(MM,GETDATE()) + ' ' +DATENAME(YY, GETDATE())

-- RESULT SET AS (Friday September 2010)


Life is Good
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000