-
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
-
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 :wave:
-
Re: date set to Tuesday