Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to insert date in below format

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Duplicate of https://coderanch.com/t/492038/JDBC/java/Not-able-convert-string-date
Please Carefully Choose One Forum.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic