Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Date Math

843836Nov 29 2004 — edited Dec 2 2004
Does anyone know an accurate way to calculate the difference in days between two java.util.Date objects. I have been setting the time to 00:00:00, subtracting one object's getTime() value from the others and dividing the result by 86,400,000 it doesn't seem to always be accurate.

Any ideas?

Thanks,

Matt
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2004
Added on Nov 29 2004
13 comments
230 views