I have: startDate = 03.24.2013 21:01:20 endDate = 03.24.2013 21:01:40
I do in my code
Date d = new Date(endDate.getTime()-startDate.getTime)
and d = 01/01/1970 02:00:20
If 2 hours is required, the interval should be 20 seconds, but I get 2 hours and 20 seconds. Why is this happening? What to do about it?
source share