View Single Post
Old 09-19-2012, 03:37 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,195
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Quote:
If I remove the ' from in front of the Today and Future with the dates in yyyy-mm-dd format it works fine.
That makes no sense.

If you do that, they you will be doing something like
Code:
... WHERE Cncrt_dateseq BETWEEN 2012-09-19 AND 2012-11-18 ...
and the SQL engine will see that as *SUBTRACTION*!! That is, it will see it as
2012
minus 09 (==>>1993)
minus 19 (==>>1974)

At least with the '...' around those values I could see it working.

Are you *SURE* the values in the database look like '2012-10-03' and not 20121003 (that is, numbers)??

Take a screen shot of an Access display of the table data and show it.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote