Bookmark Topic Watch Topic
  • New Topic

How to insert date in below format

 
Kartik Tal
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi in my oracle database am having a column of type "DATE".

And I want to insert date in the format of "19/Apr/2010 17:46:57" using java. While am inserting in this format its giving an exception of "date format picture ends before converting entire input string".

How to insert in this format?



Regards,
Kartik
 
Sona Patel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Kartik,

I am not sure but you can try following syntax in your insert statement. I am considering that you are executing insert statement from java class.

To_DATE(TO_CHAR('Your_Date','dd/Mon/yyyy HH24:MI:SS'))

Hope this helps.

 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of http://www.coderanch.com/t/492038/JDBC/java/Not-able-convert-string-date
Please Carefully Choose One Forum.
 
    Bookmark Topic Watch Topic
  • New Topic