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
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,
I agree. Here's the link:
subject: Can anyone send me the code to calculate the years/months/days between the tow dates.
Days between two dates
calculate difference in months
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-2015