Forums

ASP

This topic is locked

Using Conditional Statements to set variables

Posted 08 Aug 2008 05:17:58
1
has voted
08 Aug 2008 05:17:58 Sirena Ferris posted:
<font face='Arial'>
Hello! I am in need of an assist. I am trying to create a conditional statement that will create variables, but I am running into some problems. The statement needs to check to see if the time is between 3:00pm on a Thursday and between 3:00pm on the following Friday. so Thursday 3:00pm - Friday 3:00pm
I know that I have to incorporate a code that can determine the days of the week and the one I have is:

&lt;%
Dim strDay
Dim strMonth
strDay=(weekday(date))
Select Case strDay
case 1 Response.write("Sunday"
case 2 Response.write("Monday"
case 3 Response.write("Tuesday"
case 4 Response.write("Wednesday"
case 5 Response.write("Thursday"
case 6 Response.write("Friday"
case 7 Response.write("Saturday"
End Select
%&gt;

But I cannot figure out a way to manipulate this code to get it to set either a session variable that will indicate we have the right day (so then I can create another conditional statement relative to time) or how to make it check if it is between thursday at 3 and friday at 3 at the same time. Any suggestions would be extremely helpful!!

Thanks in advance,
Sirena
</font id='Arial'>

Reply to this topic