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.
| Author |
Topic |
|
sqlchiq
Posting Yak Master
133 Posts |
Posted - 2008-10-10 : 11:32:26
|
| I have a column of dates but I want the name of the day instead.tried convert(dddd, column) no lucktried datepart(dddd, column) it gives me the date in number format, i need the actual name of the day. Anyone? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-10 : 11:39:59
|
| select datename(dd,column) from table |
 |
|
|
sqlchiq
Posting Yak Master
133 Posts |
Posted - 2008-10-10 : 11:42:11
|
quote: Originally posted by visakh16 select datename(dd,column) from table
The output is still in number.Eg. for 10/10/2008 it displays 10 instead of "Friday" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-10 : 11:43:38
|
| select datename(dw,column) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-10-14 : 03:34:08
|
quote: Originally posted by visakh16 select datename(dw,column)
I prefer weekday in place of dw which is more readable MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-14 : 03:51:23
|
quote: Originally posted by madhivanan
quote: Originally posted by visakh16 select datename(dw,column)
I prefer weekday in place of dw which is more readable MadhivananFailing to plan is Planning to fail
yeah...it really is more readable..Its been my habit to use dw always |
 |
|
|
|
|
|