ScrewBalll
Programmer
Hi there,
I'm hoping someone can help me with a Date problem in SQL.
From one database I am being passed two fields, a Year and a WeekNbr (1-52). From these two fields I have to construct a date for the begining of the week, ie Monday.
For example if I'm passed the year 2005 and week 1, I want to come up with the date 3rd Jan 2005 as that was the first Monday of the year.
Anyone got any ideas?? I can use the Datepart function to get from a date to the week, year etc but I cant see a way of doing it in reverse. Thanks.
I'm hoping someone can help me with a Date problem in SQL.
From one database I am being passed two fields, a Year and a WeekNbr (1-52). From these two fields I have to construct a date for the begining of the week, ie Monday.
For example if I'm passed the year 2005 and week 1, I want to come up with the date 3rd Jan 2005 as that was the first Monday of the year.
Anyone got any ideas?? I can use the Datepart function to get from a date to the week, year etc but I cant see a way of doing it in reverse. Thanks.