Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Convert string date for oracle database  RSS feed

 
Greenhorn
Posts: 16
  • 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: 16
  • 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: 66784
168
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!