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 |
|
LMartin
Starting Member
2 Posts |
Posted - 2010-05-19 : 10:08:20
|
| Can anyone tell me how to convert a date to a week number? (i.e. 5/18/2010 is week 20) |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-19 : 10:16:44
|
| select datepart(week,'5/18/2010')MadhivananFailing to plan is Planning to fail |
 |
|
|
LMartin
Starting Member
2 Posts |
Posted - 2010-05-19 : 11:16:54
|
| Will that still work if we are running a query and we are trying to convert all the dates to a week number so that we can then subtotal by week number? |
 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-05-19 : 11:28:38
|
| Yes it will. Did you try? |
 |
|
|
|
|
|