Click to See Complete Forum and Search --> : Date comparison problem


green'n'white
07-14-2006, 01:10 PM
hi,

Using asp I am attempting to select the next record from my access db where the date is after today but cannot seem to get it right, i keep getting different error messages.

If the query is something like;

"SELECT TOP 1 games.date, games.opposition, games.venue FROM games WHERE the game date is after today ;"

By the way the date format in the db in dd/mm/yyyy, not sure if this is part of the reason for my failure.

Thanks in advance.

russell
07-14-2006, 01:15 PM
SELECT TOP 1 [date], opposition, venue
FROM games
WHERE [date] > Date()
ORDER BY
[date] ASC

green'n'white
07-14-2006, 01:44 PM
Thanks Russel,

Worked a treat