|
 |
asp_web_howto thread: Finding the next tuesday
Message #1 by "Bergeron, Jared" <jared.bergeron@o...> on Tue, 26 Feb 2002 11:28:03 -0800
|
|
anyone have any good examples on how to find the numeric date for the next
occurring Tuesday after given date()?
Thanks,
-Jared
Message #2 by "Debreceni, David" <Debreceni.David@h...> on Tue, 26 Feb 2002 14:45:24 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1BEFE.2214E590
Content-Type: text/plain;
charset="iso-8859-1"
This should work for ya
mydate = now
if weekday(mydate) = 3 then
nextTuesday = Dateadd("ww", 1, mydate)
elseif weekday(mydate) < 3 then
nextTuesday = Dateadd("d", (3 - weekday(mydate)), mydate)
elseif weekday(mydate) > 3 then
nextTuesday = Dateadd("d", ( weekday(mydate)-3), mydate)
end if
response.write nextTuesday
hope that helps
David Debreceni
Senior Visual Basic/ASP Developer
xxx-xxx-xxxx x 1086
-----Original Message-----
From: Bergeron, Jared [mailto:jared.bergeron@o...]
Sent: Tuesday, February 26, 2002 2:28 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Finding the next tuesday
anyone have any good examples on how to find the numeric date for the next
occurring Tuesday after given date()?
Thanks,
-Jared
$subst('Email.Unsub').
Message #3 by "Jerry Diegel" <diegelj@g...> on Tue, 26 Feb 2002 13:26:14 -0600
|
|
vbscript has a Weekday() function that should make that process pretty
easy.
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/vbenlr
98/html/vafctweekday.asp
-----Original Message-----
From: Bergeron, Jared [mailto:jared.bergeron@o...]
Sent: Tuesday, February 26, 2002 1:28 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Finding the next tuesday
anyone have any good examples on how to find the numeric date for the
next
occurring Tuesday after given date()?
Thanks,
-Jared
$subst('Email.Unsub').
|
|
 |