wood burning stoves*
The moose likes Servlets and the fly likes Problem with Date Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with Date Object" Watch "Problem with Date Object" New topic

Problem with Date Object

sv krishnaveni

Joined: Mar 15, 2008
Posts: 3
i need to compare two dates (date format is dd:mm:yyyy hh:mm )in two different servlets...
for that i am converting date into string..and passing that string as parameter to another servlet...
for me it was giving null value...
for this how do we convert that string into dd:mm:yyyy hh:mm and how to compare two date objetcs....
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

java.text.SimpleDateFormat is you (non thread safe) friend.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172

Date class already has a compareTo method.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
subject: Problem with Date Object
Similar Threads
String to Date - JDK 1.4.2
compare two dates thru Calendar
converting to date format
Comparision of Time
Date validation