File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
Java in General
Can anyone send me the code to calculate the years/months/days between the tow dates.
Joined: Nov 10, 2005
Jan 27, 2006 00:34:00
I need the code to calculate the number of years/Number of months/and Number of days between the two dates.
if anyone have then please share it.
Joined: Feb 03, 2004
Jan 27, 2006 04:23:00
this is not so trivial, taking leap-years into account...
take a look at
, they have pretty much everything you need.
hope it helps,
It is sorta covered in the
JavaRanch Style Guide
subject: Can anyone send me the code to calculate the years/months/days between the tow dates.
calculate difference in months
Days between two dates
Calculate Number of Days Between Two Days
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014