Question: how to calculate days between two dates in java?
Answer: float days = (diff / (1000*60*60*24)); Note that this is a float value, not necessarily an int . In Java 8, you could accomplish this by using LocalDate and DateTimeFormatter .