There is a add(String, Object, String) method which will take a Date.
As Gary has said though a straight conversion of the Date using toString
is not acceptable to MySQL or probably any other db. He had to format
the date properly. The only way (other than writing adaptor code for
each db) is to use the PreparedStatement methods when working with
Dates, you should still be able to add them to the Criteria with the
generic add.
john mcnally
Daniel Rall wrote:
>
> Gary Lawrence Murphy <[EMAIL PROTECTED]> writes:
>
> > >>>>> "J" == John McNally <[EMAIL PROTECTED]> writes:
> >
> > J> you can try criteria.add(column, Date, comparison).
> >
> > this causes the Date item to be rendered toString(), and the
> > default java Date format is read by MySQL as a zero date.
> >
> > there is no add(String, Date, String) method. IMHO, there should be.
>
> I agree. Please submit a patch.
>
> Thanks Gary,
>
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]