So I'm trying to run an HQL query which should compare two date values and it's not behaving in the way I'd expect it to. In short, it compares the date values, but seems to ignore the hours, minutes, and seconds.
Here's my query:
The method "getRolloffDate()" gets a date in the past.
To
test this, I put a record in the database with an activationDate of 14 days and 10 minutes ago. I then set getRolloffDate() to get me a date of 14 days ago. The record in the database therefore has an activationDate 10 minutes prior to the date I'm comparing it to.
While I expected this record to be excluded from the query results, it is included. If I go back far enough that the date is different, the query works as expected. But, if I'm only off by a number of minutes or hours, the comparison seems to ignore that.
Any ideas?
[ June 11, 2008: Message edited by: Corey McGlone ]