| Author |
Calculating Days
|
francis varkey
Ranch Hand
Joined: Sep 13, 2005
Posts: 155
|
|
Respected Sirs, What is the best way for calculating number of days between two dates(java.util.Date object) ? Thanks Francis
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Use java.util.Calendar:
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
francis varkey
Ranch Hand
Joined: Sep 13, 2005
Posts: 155
|
|
Wrong code: please provide inputs "04/06/2008" and "05/09/2008".
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Which produces 93, just like Visual Basic's DateDiff function does. Well, that, is, using dd/MM/yyyy as the format. Otherwise it's 33, just like Visual Basic's DateDiff function does
|
 |
 |
|
|
subject: Calculating Days
|
|
|