[thelist] ASP: SQL Select records within 1 week.
Ed McCarroll
Ed at ComSimplicity.com
Mon Apr 12 18:09:40 CDT 2004
> SQL=("SELECT TOP 5 * FROM t_cameraphone WHERE dDATE > '" &
> DateAdd("D",-7,Now()) & "' ORDER BY tVIEWS desc;")
Access uses "#" to delimit dates.
SQL=("SELECT TOP 5 * FROM t_cameraphone WHERE dDATE > #" &
^
DateAdd("D",-7,Now()) & "# ORDER BY tVIEWS desc;")
^
HTH,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ed McCarroll http://www.ComSimplicity.com
(310) 838-4330 PO Box 654, Culver City, CA 90232
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the thelist
mailing list