lewis94
asked on
Show if date is greater than Now
I am fairly new to ASP but have used this site and books to get a better understanding. However I want to show a range of dates for up and coming events but the date must be Today and onwards for 10 days. My date field are stored as Date_id, Event = Event_id and Location = Location_id. I use sql to call in the scripts. This may seem a stupidly basic question but I've tried so much I've given up.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried the script for the access database but keep getting an error. The SQL I use is as follows
<% sqlString = "Select * From fixtures Where DateDiff(date,now(),Date) <=10"
SET RS = oConn.Execute(sqlString)
WHILE NOT RS.EOF
%>
A colleague says it is because I use the RS method which is not suitable. Is this correct and if so how can I change it or is there a good book you could recommend?
Puzzled?????
Lewis94
<% sqlString = "Select * From fixtures Where DateDiff(date,now(),Date) <=10"
SET RS = oConn.Execute(sqlString)
WHILE NOT RS.EOF
%>
A colleague says it is because I use the RS method which is not suitable. Is this correct and if so how can I change it or is there a good book you could recommend?
Puzzled?????
Lewis94
lewis94,
With access it is:
DateDiff("d",now(),[Date])
It requires a slightly different syntax. My error as it was some ridiculous time in the morning for me when I posted that response.
Tim.
With access it is:
DateDiff("d",now(),[Date])
It requires a slightly different syntax. My error as it was some ridiculous time in the morning for me when I posted that response.
Tim.
ASKER
Just in case any one else wanted to know the answer, after playing around ith the script I used the following;
SELECT * FROM FIXTURES WHERE [DATE] BETWEEN Date() AND Date()+10 ORDER BY [DATE] DESC
Thanks for all your help
SELECT * FROM FIXTURES WHERE [DATE] BETWEEN Date() AND Date()+10 ORDER BY [DATE] DESC
Thanks for all your help
ASKER
Thanks again
Lewis94