File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Can anyone send me the code to calculate the years/months/days between the tow dates. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Can anyone send me the code to calculate the years/months/days between the tow dates." Watch "Can anyone send me the code to calculate the years/months/days between the tow dates." New topic
Author

Can anyone send me the code to calculate the years/months/days between the tow dates.

Chidanand Chauhan
Ranch Hand

Joined: Nov 10, 2005
Posts: 77
Hi

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.

Thanks
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
this is not so trivial, taking leap-years into account...

take a look at joda-time.sourceforge.net, they have pretty much everything you need.

hope it helps,
jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can anyone send me the code to calculate the years/months/days between the tow dates.
 
Similar Threads
Date Calculations
Dates..
Calculate Number of Days Between Two Days
Days between two dates
calculate difference in months