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 |
|
jparker
Posting Yak Master
118 Posts |
Posted - 2006-08-31 : 08:18:10
|
| HelloI need to do analysis on a date field to return those dates that are only a friday or a sunday.What is the best way to implement this?Thanks in advance |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-31 : 08:21:22
|
SELECT * FROM YourTable WHERE DATEPART(dw, YourColumn) IN (6, 1)But beware! This setting approach is dependent of SET DATEFIRST settingPeter LarssonHelsingborg, Sweden |
 |
|
|
jparker
Posting Yak Master
118 Posts |
Posted - 2006-08-31 : 08:24:22
|
| thanks very mucheasy when you know how :) |
 |
|
|
|
|
|