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!

How to subtract dates to get days/hrs/mins/secs when java does not allow su

843833Aug 5 2001 — edited Jul 9 2003
subtraction like this
java.util.Date DateOne;
java.util.Date DateTwo;
String difference = "";
difference = DateOne - DateTwo;

Does anyone out there have some sample code for this. Seems like its a pretty simple thing, its just taking me for a whirl.
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2003
Added on Aug 5 2001
4 comments
321 views