Does anyone know of a formula to getting this?
Here is the question:
Q)Determine the exact time in days by between March 25, 2007 and February 16, 2009
A) 694 days
There's no simple formula, since you have to take leap years into account, etc.
In your case, you can procede as follows:
- between March 25, 2007 and March 25, 2009 (at the same time of the day, like at twelve o'clock), two years have elapsed, including February 2008, so that there are 365+366=731 days in between.
- Between February 16, 2009 and March 16, 2009, there are 28 days, and between March 16, 2009 and March 25, 2009, there are 9 days.
Finally, there are 731-(28+9)=694 days between March 25, 2007 and February 16, 2009 (at the same time of the day).