Date Query
I've got a table of links. Each link has a start date and a stop date. I'm trying to eliminate the expired links from the recordset using DATE to get the current system date.
Here is my query:
set rs = DataConn.Execute("SELECT link_group, link_name, link_start, link_stop " & _
"FROM links " & _
"WHERE link_group = " & varGroupId & _
"AND link_stop > " & DATE & _
" ORDER BY link_name")
When I run the query, all the records return including the expired links (those that are less than today's date). Is there something wrong with the way I'm trying to use the date in my query? I'm using MS SQL 2000. Datatype is Date/Time. Records are formatted as mm/dd/yyyy in the table.
|