Sunday, February 19, 2012

Get Monday date from Week no

Within Tsql or RS field design environment, how can you return the Monday of
each week from either an ISO date or SQL week no value
Have been looking at DateAdd and DatePart functions with no luck
Thanks
IanCouple of article here on how to do it in tsql:
Get First Day of the Week Function
http://www.sql-server-helper.com/functions/get-first-day-of-week.aspx
Get first and last day of a week
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50624
Haven't tried any of them, but at least the discussion gives you a lot of
hints as well.
Kaisa M. Lindahl Lervik
"IanP" <IanP@.discussions.microsoft.com> wrote in message
news:1AE2E1B7-C667-4E17-B75A-9209A87A4A1C@.microsoft.com...
> Within Tsql or RS field design environment, how can you return the Monday
> of
> each week from either an ISO date or SQL week no value
> Have been looking at DateAdd and DatePart functions with no luck
> Thanks
> Ian|||Thanks Kaisa will investigate
Ian
"Kaisa M. Lindahl Lervik" wrote:
> Couple of article here on how to do it in tsql:
> Get First Day of the Week Function
> http://www.sql-server-helper.com/functions/get-first-day-of-week.aspx
> Get first and last day of a week
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50624
> Haven't tried any of them, but at least the discussion gives you a lot of
> hints as well.
> Kaisa M. Lindahl Lervik
>
> "IanP" <IanP@.discussions.microsoft.com> wrote in message
> news:1AE2E1B7-C667-4E17-B75A-9209A87A4A1C@.microsoft.com...
> > Within Tsql or RS field design environment, how can you return the Monday
> > of
> > each week from either an ISO date or SQL week no value
> >
> > Have been looking at DateAdd and DatePart functions with no luck
> >
> > Thanks
> >
> > Ian
>
>

No comments:

Post a Comment