I am using mySQL with OJB to build an event calendar. I need to display 1 month's worth of events. At first, I tried code like this:
criteria.addBetween("EventDate", startDate, endDate);
where startDate and endDate are java.util.Dates. I got no results, even though there are events in the database between those two dates. I retried with a single addGreaterOrEqualThan(). This worked as expected, returning events whose date was on or after the startDate submitted. I then tried the addLessOrEqualThan(). This returned 0 results, even though there are events before the submitted date in the database.
The Javadocs show examples of these commands being used with integers and not dates. Am I wrong to even attempt this? I would prefer not to implement my method an addSQL() call. I would think Date-handling would be automatic with an OJB tool.
Thanks for the help, Aaron
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
