There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: Date Compare


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
coachdan32's Avatar
Computer Specs
Senior Member with 1,000 posts.
 
Join Date: Nov 2003
Location: Louisville, KY
14-Mar-2005, 09:55 AM #1
Question Solved: Date Compare
I am trying to come up with an idea on writing an effective script (ASP) to compare the date to another date hard-coded in and return the correct info. It is for a baseball teams website to list where each team is each day. My idea is to have it scroll across in a marquis if it's possible.

Here's my thought process:

varToday = Date() 'store todays date in variable

Select Case varToday

Case 03/30/05
Freshmen vrs. Ballard (A) 6:30
JV - idle
Varsity vrs. Ballard (H) 4:30

Case 03/31/05
Freshman vrs. Eastern (H) 4:30
JV vrs. Eastern (H) 7:00
Varsity vrs. Eastern (A) 4:30

End Select

I know there is more to it than that, but I am not sure how to proceed. Can it be done in a scrolling marquis? I am not using a db at this time - it will be hard-coded.
__________________
CoachDan
http://www.malehsbaseball.com

Gateway Pentium 4 3.0 GHz
200G Sata HD
800 FSB
512 DDR
DVD +-R/W
XP Home
coachdan32's Avatar
Computer Specs
Senior Member with 1,000 posts.
 
Join Date: Nov 2003
Location: Louisville, KY
14-Mar-2005, 01:41 PM #2
Any thoughts?
coachdan32's Avatar
Computer Specs
Senior Member with 1,000 posts.
 
Join Date: Nov 2003
Location: Louisville, KY
18-Mar-2005, 11:34 AM #3
I decided to abandon the scrolling marquis idea - I am going to add a table to do it in.

I have 3 columns that I am going to call the variables in (varVarsity, varJV, varFresh). I am using the following scenario to determine contents:

varDate = Date()

Select Case varDate
Case 3/28/05
varVarsity = "idle"
varJV = "Ballard (A) 7:00"
varFresh = "Ballard (A) 4:30"
End Select

This is just one instance of the select statement, there are many more dates. I have 2 main problems I could use advice on:

1. I am not sure what format the date will be coming in. Will it be an actual date? Or will it be a number? Does the select statement date need to be in quotes?

2. Somehow I need to put the Select inside a nested IF and I don't know how to handle this. I only hard-coded the dates between the start of the season and the end of the season. Before it enters the Select Statement I need to check the value and if it is before 3/28/05, I need to set all three variables to "idle". Also, if the value is greater than 5/20/05, I need to set all three variables to "idle". Any suggestions would be great?
__________________
CoachDan
http://www.malehsbaseball.com

Gateway Pentium 4 3.0 GHz
200G Sata HD
800 FSB
512 DDR
DVD +-R/W
XP Home
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:54 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.