A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Subtracting Dates in JAVA
Joined: Jun 05, 2003
Dec 16, 2003 03:54:00
Can anybody give me a code snippet to subtract dates in JAVA? The idea is to get the number of days between any 2 dates.
Joined: Jan 09, 2001
Dec 16, 2003 06:36:00
How about getting the difference in milliseconds:
d1.getTime() - d2.getTime();
Joined: Nov 09, 2000
Dec 16, 2003 07:43:00
I agree. Here's the link:
subject: Subtracting Dates in JAVA
amount of days ????
caculating the difference between dates
Passing Date from HTML Form to JSP/Action Handler
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013