• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert string date for oracle database  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have this date format in my code : 2008-11-24 19:25:24.0.  This value is a String format which i am getting from other source. I want to convert/parse this to Date format and using preparedstatment i want to insert into database. Please help me out on this

Regards,
Kiran
 
Kiran Er
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to convert 2008-11-24 19:25:24.0 into 24-NOV-2008 using Java and insert into database
 
Author and ninkuma
Marshal
Posts: 66345
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Kiran Er wrote:I want to convert 2008-11-24 19:25:24.0 into 24-NOV-2008 using Java and insert into database


No, you likely don't.

What is the type of the database column? Unless it's a string type, you want to convert to a date instance, not another string format.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!