IIS ASP - Date Question

This is Interesting: Free IT Magazines  
Home > Archive > IIS 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]

Author Date Question
AGB

2005-08-26, 5:59 pm

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 week based on the current
day.

Any help?

Aaron Bertrand [SQL Server MVP]

2005-08-26, 5:59 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 week based on the current
> day.
>
> Any help?
>



AGB

2005-08-26, 5:59 pm

That works great, thanks

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com