File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes converting to date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "converting to date format" Watch "converting to date format" New topic

converting to date format

anil bisht
Ranch Hand

Joined: Nov 04, 2000
Posts: 81
I have date in the format
String s1 = 2001-11-16 12:12:12.12 this is in some string( not date)
String s2 = 2001-11-17 12:12:12.12 this is in some string ( not date)
I have to compare these two dates how can i do it ???

Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

Please have a look at the JavaDocs for the package java.text.* Checkout DateFormat and SimpleDateFormat

Junilu - [How to Ask Questions] [How to Answer Questions]
jQuery in Action, 3rd edition
subject: converting to date format
It's not a secret anymore!