Nick Fleetwood
Nick Fleetwood

Reputation: 531

Trouble with Selecting Records between Two Dates

I have a table of transactions. I need to query the table for only the transactions between a given set of dates.

This should be a simple SQL query. I have the following:

SELECT * 
FROM Main
WHERE Main.InvoDate BETWEEN #06/15/19# AND #06/31/19#;

But when I run it, I get

Syntax error in date in query expression 'Main.InvoDate BETWEEN #06/15/19# AND #06/31/19#'

Not sure where to go from here. Everything that I have seen seems to say that this code block should work. I have tried "2019" as opposed to "19", and I have also tried "ddmmyyyy".

Thanks

Upvotes: 1

Views: 64

Answers (1)

Deepstop
Deepstop

Reputation: 3807

There are only 30 days in June.

Upvotes: 3

Related Questions