Davit Siradeghyan
Davit Siradeghyan

Reputation: 6333

Data type mismatch in criteria expression

I'm getting this error: Data type mismatch in criteria expression when trying to execute this query in access:

select sum(total_sum) from totals_table where tot_date >= '3/01/2010' and tot_date < '4/01/2010'

P.S. tot_date is of type Date/Time and tot_sum is of type Number

Upvotes: 0

Views: 263

Answers (1)

Run CMD
Run CMD

Reputation: 3035

For access, you need BETWEEN for the dates:

WHERE Date BETWEEN #2009/12/30# AND #2010/12/30#

Also write your dates between ##.

Upvotes: 1

Related Questions