I have the following field which is stored as a string: [field3]"2006090111123500"
the first 8 characters represent the date but backwards.
I want to filter between dates.
I have the following in the query grid:
CallDate: DateValue(Right(Left([Field3],8),2) & "/" & Mid(Left([Field3],8),5,2) & "/" & Left([Field3],4))
with criteria: >=#01/10/2006# And <=#31/10/2006#
This seems to work on october data no problem
I had hoped to put all the september data into the same data table and filter but it failed so I created a new table called september data and pointed the query to it but for september:
with criteria: >=#01/09/2006# And <=#30/09/2006#
however the query fails if I take out the calldate expression it works no problem.
In fact it works providing I dont try and filter on date or sort by ascending.
it says data type mismatch in criteria expression. I had hoped that datevalue would turn the string into a date.
Its strange that it works in one query and not in the other with only the data being different.
Can anyone see why this should fail have I done something stupid?
kind regards in advance.
peter
the first 8 characters represent the date but backwards.
I want to filter between dates.
I have the following in the query grid:
CallDate: DateValue(Right(Left([Field3],8),2) & "/" & Mid(Left([Field3],8),5,2) & "/" & Left([Field3],4))
with criteria: >=#01/10/2006# And <=#31/10/2006#
This seems to work on october data no problem
I had hoped to put all the september data into the same data table and filter but it failed so I created a new table called september data and pointed the query to it but for september:
with criteria: >=#01/09/2006# And <=#30/09/2006#
however the query fails if I take out the calldate expression it works no problem.
In fact it works providing I dont try and filter on date or sort by ascending.
it says data type mismatch in criteria expression. I had hoped that datevalue would turn the string into a date.
Its strange that it works in one query and not in the other with only the data being different.
Can anyone see why this should fail have I done something stupid?
kind regards in advance.
peter