Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

or inside if statement

Status
Not open for further replies.

lagc

Programmer
Jan 21, 2009
79
GB
I'm stuck on the code below guys, anybody see the obvious mistake.

Code:
  <% if (WeekDayName(WeekDay(Date) = ("Saturday"))) or (WeekDayName(WeekDay(Date) = ("Sunday"))) then %>

This is the error I'm getting

Code:
Microsoft VBScript runtime error '800a0005' 

Invalid procedure call or argument: 'WeekDayName'

Its basically not working, but I cant get it to work.

Cheers
 
You brackets are misplaced.
Try:

Code:
<% 
if WeekDayName(WeekDay(Date)) = "Saturday"  or _
   WeekDayName(WeekDay(Date)) = "Sunday" then %>
 
Thank you foxbox, I'm over complicating things as usual.

Thanks for the help, works brilliantly.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top