PDA

View Full Version : OR Statement


christrinder
03-14-2003, 02:57 PM
Does an 'IF' statement support 'OR', because my code below, dosn't work...

<% If month(date()) = 1 or 6 then response.write "...." End If %>

The result of the above is that it always writes the output. Any ideas?

Thanks,

Chris

oracleguy
03-14-2003, 04:15 PM
I believe you have to do it this way:

<% If month(date()) = 1 or month(date()) = 6 then response.write "...." End If %>

arnyinc
03-14-2003, 08:27 PM
oracleguy is correct. The way you originally have it, it is basically evaluating:

if 6 then...

because the second clause isn't dependent on the first one.