> -----Original Message-----
> From: Gary Lawrence Murphy [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, June 20, 2001 11:41 AM
> To: turbine-user
> Subject: How to compare DATETIME (Re: Panic attack)
>
> No, on second thought, I was right the first time: Criteria has no
> add(datecolumn, java.util.Date, comparison)
>
> A non-portable work-around is to format the date into a MySQL-accepted
> string format and submit that instead (using SimpleDateFormat):
>
> SimpleDateFormat df
> = new SimpleDateFormat ("yyyy-MM-dd hh:mm:ss");
> String now = formatter.format(new Date());
> Criteria c = new Criteria()
> .add( TableA.EXPIRES, now, Criteria.LESS_THAN );
> TableA.doDelete(c);
>
> it is also curious that Torque DATE does not map to DATE but maps
> to DATETIME, whereas Torque TIME maps to TIME and TIMESTAMP maps
> to TIMESTAMP ... almost every SQL server supports DATETIME, so it
> is probably a good idea to have DATE map to DATE and introduce a
> DATETIME option.
>
> --
> Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
> Business Innovations Through Open Source Systems: http://www.teledyn.com
> "Computers are useless. They can only give you answers."(Pablo Picasso)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]