troubleshooting Question

VB Script array

Avatar of freezilla
freezilla asked on
ASPVB Script
5 Comments1 Solution339 ViewsLast Modified:
I'm nearly done with a project and I've got the right idea, but I'm not sure if I'm implementing it correctly.

The rundown, I've got an Access DB (no way around this) with 28 tables, two for each day of the week covering two weeks.

Now what I want to do is have my code display one week and if it's not that week, display the other.  I've got that set up, but I just want to make sure that my formatting is correct.

Here's what I have:
<%
ctime = FormatDateTime(Time,vbShortTime)
cday = WeekDayName(WeekDay(Date))
cweek = DatePart("ww", Now)
%>

As of this writing we're in week 21.

So I want to say...
<% if cweek = "21" or "23" or "25" then%> (the ... would represent the other odd weeks in the year.

Display the code for the odd weeks.

<% else %>
Display the even number week's code.
<% end if %>

Would that work?
ASKER CERTIFIED SOLUTION
lisfolks

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros