Can I use to_date(sysdate, 'dd-mm-yyyy') to remove the precision for time of the day? Cos I have a value in db "27-JUN-2007'. But when I pass to_date(sysdate, 'dd-mm-yyyy') to my select query in iBatis, it does not return any value. Any help in this will be great. Thanks
-----Original Message----- From: Ralf Assmann [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2007 2:07 PM To: Mani, Bharathi Subject: Re: How to use system date Depending on your database, you can use the database' date, e.g. for a db2: "select * from test where date = current date" The should be similar functions for other databases. Alternatively, make a java.sql.Date using System.currentTimeMillis() and pass this attribute. Ralf Assmann ------------------------------------------------------------------- Ralf Assmann, Dipl.-Ing. (FH) Innovations Softwaretechnologie GmbH Ziegelei 7, 88090 Immenstaad, Germany Tel.: +49 7545 202-324 Tel.: +49 7545 202-300 (Zentrale) Fax.: +49 7545 202-301 Email: [EMAIL PROTECTED] Web: http://www.innovations.de ------------------------------------------------------------------- Geschaeftsfuehrung: Achim Berger, Thomas Cotic, Walter Pitz Reg.-Gericht Ulm HRB 631622 ------------------------------------------------------------------- [EMAIL PROTECTED] schrieb: > > Hi, > > How can I pass current system date to a select query in iBatis? > > 'Select * from test where data = sysdate'. Will this work? > > Thanks, > > Bharathi > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete > the original. Any other use of the email by you is prohibited. > This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
