| Author |
How to Compare to dates and get the difference
|
Rajesh Kannan Gurusamy
Greenhorn
Joined: Mar 08, 2006
Posts: 1
|
|
Can any one guide me to compare to dates and get the difference.I can use before or after method to check the date is before the date passed as argument.is there any other method to get the difference?
|
 |
Mark Vedder
Ranch Hand
Joined: Dec 17, 2003
Posts: 624
|
|
Welcome to the ranch... Take a look at these articles from JavaWorld. They should help. Calculating Java datesWorking in Java time : Learn the basics of calculating elapsed time in Java You can also look at JavaAlmanac.com for some date examples. In the past, I have recommended those articles to posters that asked very similar questions. They have consistently found the articles useful and were able to come up with solutions to their problems. If after reading the articles, you still have some questions, please post them and some one can assist you further. I hope that helps.
|
 |
Jan Groth
Ranch Hand
Joined: Feb 03, 2004
Posts: 456
|
|
if you have to go knee-deep into details, like leap-years and summer/winter-time, i made very good experiences with joda-time. that's an open-source framework, and can be found here. hope it helps, jan
|
 |
 |
|
|
subject: How to Compare to dates and get the difference
|
|
|