This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 98
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: 2491

Duplicate of
Please Carefully Choose One Forum.

OCUP UML fundamental and ITIL foundation
youtube channel
I agree. Here's the link:
subject: How to insert date in below format
Similar Threads
date inserting
how to change the date,Time format after accessing it from the database
Date Format Problem
hi urgent
Insert date using SQL task