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 Java in General and the fly likes String to date conv 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 » Java » Java in General
Bookmark "String to date conv" Watch "String to date conv" New topic

String to date conv

sreeni san
Ranch Hand

Joined: Aug 14, 2001
Posts: 39
I have date returned in a string in the format 2001-12-05 16:34:53.93 from the database. I have another date of the same format returned in a String from the database. I need to compare both of these and find the greater date.
How do I do these.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
This should do the trick...

Hope that helps,

SCJP Tipline, etc.
I agree. Here's the link:
subject: String to date conv
Similar Threads
Getting error while inserting data into table
Convert a String with a date valus for Oracle
how to change the date,Time format after accessing it from the database
Date Formatting
date problem