I recently ran into a frustrating issue while doing some date comparisons within ColdFusion Query of Queries (QofQ) and selecting records with dates less than a specified date using <cfqueryparam>.
Luckily I was already familiar with the "quirky" behavior of QofQ when it comes to dates and how you need to use createODBCDate() (or createODBCDateTime()) before making comparisons. If you're curious why I'm using cfqueryparam's in my QofQ date comparisons you can find a bunch of articles about why this is done but here's a popular one from Ben Nadel if you're up for some reading: ColdFusion Query of Queries Unexpected Data Type Conversion
Anyway, I came across a slightly different issue where the date comparison was ignoring time differences within the same day. Check this out: