Question: how to calculate difference between two days 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 .