|
-
Dec 29th, 2005, 04:23 PM
#1
Thread Starter
New Member
date set to Tuesday
I'm trying to create a simple if else statement that when it is Tuesday I want to run piece of code 'A' and when it's not Tuesday I want it to run code 'B'. If I have a global variable = to 3 (the VB day for Tuesday - i think!?) how can I incorporate that into an expression stating if today's date = 3 (or Tuesday) then run A else B? I'm just not sure how to set that up correctly and how to make it so that the code realizes that the global variable set to 3 means Tuesday. Make sense? Any help is greatly appreciated. Thanks!!
-sly
-
Dec 29th, 2005, 06:45 PM
#2
Lively Member
Re: date set to Tuesday
<%
TodaysDate=date()
if WeekdayName(weekday(TodaysDate))="Tuesday" then
response.write("today is: Tuesday <br>")
else
response.write("today is not: Tuesday <br>")
end if
%>
hope this code is of some help to u
*********** "why do things that are suspose to bad for us taste so good, whats ur addiction"
Kanye West **********
-
Dec 30th, 2005, 12:28 PM
#3
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|