INSERT into table (datecol) VALUES (TO_DATE('2002-02-30','YYYY-MM-DD')) or
INSERT into table (datecol) VALUES (SYSDATE) Bye, John Nicole Amashta <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK, it has been a long while since I've used Oracle, but from what I > remember, the format of the date is *not* the one you are using. I believe > it should look like this: yyyy-mm-dd or mm-dd-yyyy > > I may be wrong about the format, but I remember originally having trouble > with the dates when I used oracle for the first time. > > Anyone have more insight? > > -Nicole > www.aeontrek.com > > "Sandeep Murphy" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, > > > > I have been trying to insert the current date into ORACLE in vain... > > > > my query reads like this.. > > > > java.text.SimpleDateFormat formatter = new > > java.text.SimpleDateFormat("dd/MM/yyyy"); > > java.util.Date currentTime_1 = new java.util.Date(); > > String dateString = formatter.format(currentTime_1); > > > > // Have to use Java.util.date.... > > > > out.println( "<br>" ); > > out.println( dateString ); // shows current date Fine.. > > > > sql = "INSERT into > > RESERV_DOC_UPD(CODE,DOC_COD,COLAB_COD,RESERVED,DATE_RESERV)"; > > > > sql += > > > "VALUES("+temp+","+code+","+COLAB_COD+","+RESERVED+","+(to_date(dateString, > > dd/mm/yyyy))+")"; > > > > Can anyone Please tell me whats wrong with this query and the remedy for > > it!!??? > > > > Thnx a lot in adv, > > > > gaucho > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php