I have a situation. I have two kinds of dates in mysql database. One is the date, and the other is the date and time. Now, in sleep mode, should I check if one date is longer than the other or not?
criteria.add (Restrictions.lt ("award.deadline", "submission.date_received"));
But different types cause problems with displaying "java.lang.ClassCastException: java.lang.String cannot be attributed to java.util.Date".
Even I tried to parse it with a date parser, but it does not accept a date, since it only accepts a string. So, can you tell me how we can convert one date to another type inside the criteria for sleep mode?
source
share