[thelist] Dates, ASP and mental health
Ryan Mayberry
Ryan at applicor.com
Fri Mar 30 16:39:47 CST 2001
I am working on an events calendar, built in ASP running off a SQL 7
Database Server..
In the database I am recording the Start Date and End Date of the event...
On the page that is supposed to display events I have a date variable
(view_date) which is either the current date or one selected by the user..
I am grabbing all the events from the database and looping through them and
displaying the ones which match the following if statement..
-------------
IF objRS("dteEvStart") <= view_date and objRS("dteEvEnd") >= view_date THEN
do this
END IF
-------------
This seems to only half work.. it works fine one some dates, but others it
hates and it seems to ignore the year completely. Example: An event which
should only show up between April 12 and April 15, 2001 will also show up
between April 12 and April 14, 2003
I have also tried grabbing the proper events right in my SELECT statement,
which is what I would prefer to do, but that seemed to return no results.
I am thinking I should record a date range in the database instead of a
start date and an end date, but I don't really want to go back and make that
change (and I don't really know how anyway).
If anyone has some suggestions I sure would like to hear about it..
Kerkness
(my brain hurts.. )
More information about the thelist
mailing list