S
Stuart Palmer
I am trying to compare the current date() with the date in an access db to
pull out only records where the date is later than the todays date (so
records where the date hasn't passed)
Then I do this:-
strSQL = "select * from tblEvents where enddate > " & date() & " order by
startdate"
it pulls me out every record even ones with the dat in the past.
When I response.write the date() and objRS("enddate") to the screen the
dates are correct/same format and the date() is older than the
objRS("enddate") . So why is it pulling it out of the DB.
I know a way to do it would be to pull all records out and do an if
statement, but if I have, for example, 100 events 98 of which were expired,
then it would be a waste of processing time to do the if and loop when I
could pull them out from the DB from the start.
Any ideas how I can et round this please?
Cheers for anyones help.
Stu
pull out only records where the date is later than the todays date (so
records where the date hasn't passed)
Then I do this:-
strSQL = "select * from tblEvents where enddate > " & date() & " order by
startdate"
it pulls me out every record even ones with the dat in the past.
When I response.write the date() and objRS("enddate") to the screen the
dates are correct/same format and the date() is older than the
objRS("enddate") . So why is it pulling it out of the DB.
I know a way to do it would be to pull all records out and do an if
statement, but if I have, for example, 100 events 98 of which were expired,
then it would be a waste of processing time to do the if and loop when I
could pull them out from the DB from the start.
Any ideas how I can et round this please?
Cheers for anyones help.
Stu