Help Debug my script!

Basically I’m trying to compare some dates and then set actions accordingly.

Say If today >22/12/03 or Today<= 09/01/04 then

X + y = z

or else

if today > 09/01/04 or today <= 23/01/04 then *** This is where the code seems to fail

some action

else

other action.

end if

My code is below :

If Today() > profileDoc.Dec2nd(0) Or Today() <= profileDoc.Jan1st(0) Then

gnWebDoc.thisbatch = profileDoc.Jan1st(0)

Elseif Today() > profileDoc.Jan1st(0) Or Today() <= profileDoc.Jan2nd(0) Then *** This part would evaluate true if today is 26/01/04 which I do not want to happen!

gnWebDoc.thisbatch = profileDoc.Jan2nd(0)

Else

gnWebDoc.thisbatch = profileDoc.Feb1st(0)

End If

Any ideas on why I’m getting this?

Thanks

Subject: Help Debug my script!!!

you ask for if today is bigger the 09/01/04 so it is. If this is true you jump out of the check part. Change OR with AND. You realy want to compare between two dates.

Subject: RE: Help Debug my script!!!

Of course it is… Thanks it just worked.