0

Me again, sorry.

Trying to get all the data between two dates in my Access Database. The data type for the column is "Date/Time" which I believe is correct.

SELECT *
FROM SaleProperty
WHERE MarketDate BETWEEN '01/05/2013' AND '30/06/2013';

When I use this, I am told that there is a data mismatch and the query does not work. Sorry again for what is probably a very basic question but I have no idea what I am doing wrong.

Cheers again!

1 Answer 1

1

Access (Jet) uses # to identify a date literal. Try this:

SELECT *
FROM SaleProperty
WHERE MarketDate BETWEEN #01/05/2013# AND #30/06/2013#;
Sign up to request clarification or add additional context in comments.

1 Comment

Ah, I didn't think of looking for things which only Access does when it comes to dates. Thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.