Home > Archive > ASP > August 2005 > Date Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi all,
I need a script that tells the user what the date is for monday and
what the date is for friday for the current w based on the current
day.
Any help?
| |
| Aaron Bertrand [SQL Server MVP] 2005-08-26, 6:55 pm |
| Given a "standard" datefirst setting, e.g. Sunday = 1, Monday = 2, you can
try this:
<%
dt = date()
dw = datepart("w", dt)
response.write "Monday = " & (dt + (2-dw))
response.write "<br>"
response.write "Friday = " & (dt + (6-dw))
%>
Might make more sense to have a calendar table though.
http://www.aspfaq.com/2519
"AGB" <andyglbl@gmail.com> wrote in message
news:1125072489.388434.254600@z14g2000cwz.googlegroups.com...
> Hi all,
>
> I need a script that tells the user what the date is for monday and
> what the date is for friday for the current w based on the current
> day.
>
> Any help?
>
| |
|
|
|
|
|