Need to print "Week of (first day of week)"
First day being Monday.

ie:
week = Request.querystring("mydate")
response.write "Week of" & week

If week = 5/6/2004 (which is Thursday) it should output "Week of Monday, May
03, 2004"

How can I do this?

Thanks!

Re: Get first day of week? by Aaron

Aaron
Thu May 06 13:20:33 CDT 2004

http://www.aspfaq.com/2489

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




"Targa" <targa1SPAMSUCKS@alltel.net> wrote in message
news:uAIIDM5MEHA.268@TK2MSFTNGP11.phx.gbl...
> Need to print "Week of (first day of week)"
> First day being Monday.
>
> ie:
> week = Request.querystring("mydate")
> response.write "Week of" & week
>
> If week = 5/6/2004 (which is Thursday) it should output "Week of Monday,
May
> 03, 2004"
>
> How can I do this?
>
> Thanks!
>
>



Re: Get first day of week? by dlbjr

dlbjr
Thu May 06 15:53:01 CDT 2004

'From dlbjr

Function GetPriorMonday(dtmDate)
GetPriorMonday = "NAD"
If IsDate(dtmDate) Then
intAdjust = WeekDay(dtmDate,2) - 1
GetPriorMonday = DateAdd("d",- intAdjust,dtmDate)
End If
End Function