1 Reply Latest reply: Oct 22, 2006 8:28 AM by 800322 RSS

    date conversion

    807607
      hello all,

      I need to convert a String to[b] 'java.sql.Date' format. so that it can be added to the database.....

      and in the 'dd/MM/yyyy' format.

      plz tell me how it can be done

      also tell me if i need to put single quotes in the query string for adding a date in the databse.....please note that i am using MS access as the DB

      Thank You
        • 1. Re: date conversion
          800322
          SimpleDateFormat to java.util.Date and from there to java.sql.Date using getTime. And if you put date instances into the database, you shoudn't need single quotes. Aren't you using a PreparedStatement?