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 |
whitmoj
Yak Posting Veteran
68 Posts |
Posted - 2009-04-16 : 03:50:18
|
I have been reading over old post's about this and the following code works great for now SELECT DATEPART(DAY, GETDATE() - 1) / 7 + 1 AS theWeekWithinMonth but how can I applie this to a table that contains 2 months worth of dataMany Thanks WhitmojIf I have inspired one person today then my job is done. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-04-16 : 04:04:43
|
SELECT DATEPART(DAY, MyDateTimeColumnNameHere - 1) / 7 + 1 AS E 12°55'05.63"N 56°04'39.26" |
|
|
whitmoj
Yak Posting Veteran
68 Posts |
Posted - 2009-04-16 : 04:10:11
|
Many thanks I tried this first but no look. It now worksWhitmojIf I have inspired one person today then my job is done. |
|
|
|
|
|