Panda On Smack
Can't get enough of FH
- Joined
- Dec 22, 2003
- Messages
- 1,030
Got the following Query which i initially used in SQL an have adapted it slightly to work on Access
SELECT EDate FROM Table WHERE (Authed = 1 AND DATEPART('m', Date()) = 9 AND DATEPART('yyyy', Date()) = 2005) Order By EDate
In my table i have a Date field and for testing purposes i have 2 entries in the table with a date from this month and a date from next month
05/09/2005
08/10/2005
The above query should only select the date from this month but it selects both, any clues as to why?
Interestingly im running the query in asp which returns the results but if put the SQL in the Query window of Access it doesnt return anything?
Ta
SELECT EDate FROM Table WHERE (Authed = 1 AND DATEPART('m', Date()) = 9 AND DATEPART('yyyy', Date()) = 2005) Order By EDate
In my table i have a Date field and for testing purposes i have 2 entries in the table with a date from this month and a date from next month
05/09/2005
08/10/2005
The above query should only select the date from this month but it selects both, any clues as to why?
Interestingly im running the query in asp which returns the results but if put the SQL in the Query window of Access it doesnt return anything?
Ta