This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Conversion" Watch "Conversion" New topic


Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
I got the date value from the html file to my servlet by using the below code,


how to convert this hiredate into "SQL DATE" type. (ORACLE)

Please give an example code.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60741

SQL date conversion isn't a servlets-specific topic, so I'm moving this off to the JDBC forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

I will let you check the API documentation pages to find out what "something" should be for whatever date format you expect to be receiving.
Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
Thank You Paul Clapham, for giving reply to my question. And the answer you have given is working.
Once again thanks for giving reply.
I agree. Here's the link:
subject: Conversion
Similar Threads
Access Autonumber
Mapping Oracle DATE to java.sql.Date ?
Objects and Constructs.
What replaces deprecated getDate() ???
Representing MilliSeconds in JDBC using Oracle