Anyone know why this query would return 12/1 dates but no 12/31 dates (cut off is 12/30)
SELECT *
FROM Tracking
WHERE (Visited >= '12/01/01') AND (Visited <= '12/31/01')
ORDER BY Visited DESC
Printable View
Anyone know why this query would return 12/1 dates but no 12/31 dates (cut off is 12/30)
SELECT *
FROM Tracking
WHERE (Visited >= '12/01/01') AND (Visited <= '12/31/01')
ORDER BY Visited DESC
Your defined cutoff is at the stroke of midnight 12/31.
Chances are you want the entire day's activity, so
you'll get closer to what you intend using < '1/1/1'
Yeah That's what I thought.. just thought it was funny... all my programming, no other language (that I can think of) excluded the day of a '<=' type comparison.. guess SQL is different. I thought maybe it was a known bug since it's the last day of the year, it didn't process it.. The expression is LESS THEN or EQUAL TOO... just funny.. anyway..
and quick tips on how to advance a form day by 1 in ASP?