File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Oracle/OAS and the fly likes How to insert date in below format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply locked New topic

How to insert date in below format

Kartik Talasu
Ranch Hand

Joined: Aug 21, 2009
Posts: 99
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?

Sona Patel
Ranch Hand

Joined: Mar 30, 2009
Posts: 75
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

Joined: Dec 20, 2006
Posts: 2565

Duplicate of
Please Carefully Choose One Forum.

OCUP UML fundamental and ITIL foundation
I agree. Here's the link:
subject: How to insert date in below format
It's not a secret anymore!