posted 20 years ago
You've got two dates right.
Now make 2 Date objects, let's say date1 using the first date you have and date2 using the second date that you have.
Now declare two long variables dateLong1 and dateLong2 and get the two date's value in millisecond and store it in the two long variables.
Now declare a third long variable dateDiffrence1 and its value is dateLong2 - dateLong1 (if dateLong2 > dateLong1)
Now, divide dateDiffrence1 with 864000 to get the no. of days.
Cool huh?