Fix date query matching

If you try to do a query to match against an exact date then you get false matches.  Tests provided to show the failure.