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 |
|
rcr69er
Constraint Violating Yak Guru
327 Posts |
Posted - 2007-11-19 : 10:09:25
|
| HiI have a group of dates, and I just need a way of retrieving the day and month of the date.Does anyone know how to do this?Thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-19 : 10:10:56
|
use datepart(day, yourdatecol) and datepart(month, yourdatecol) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
rcr69er
Constraint Violating Yak Guru
327 Posts |
Posted - 2007-11-19 : 10:14:52
|
| HeyThanks, do you know how I would get the month name to show aswell?Thanks |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-19 : 10:16:38
|
[code]datename(month, yourdatecol)[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-11-19 : 10:17:35
|
Do you know what is Books On Line ? try refer to it. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
rcr69er
Constraint Violating Yak Guru
327 Posts |
Posted - 2007-11-19 : 10:26:29
|
| Thanks |
 |
|
|
|
|
|