0
votes

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

1
It is generally best to use year, month, day format when writing out dates because there can be no ambiguity whatever the locale. - Fionnuala

1 Answers

1
votes

For access, you need BETWEEN for the dates:

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

Also write your dates between ##.