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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 help with bussiness week

Author  Topic 

nightmare207
Starting Member

1 Post

Posted - 2011-06-25 : 12:45:04
hello to all!
i have a problem and i need your help.
I have a date.from this date i want to find the week which it belongs.
spefific, i want to find the week range.
but the problem is that i don't want the typical week range.
take an example so you can understand better.
month=june
first week of the month : 30/05/11 - 03/06/11
last week of the month: 30/06/11 - 3/06/11

so,i want this...
last week of the may : 23/05/11 - 31/05/11
first week: 01/06/11 - 10/06/11
last week: 27/06/11 - 30/06/11

in the others words..
if the first day of the month is Wednesday or Thursday or Friday then these days go to the next week.
if the last day of the month is monday, Tuesday ,Wednesday then these days go to the previous week.

thank you very much!!
   

- Advertisement -