Calculating dates
Assuming your date is in A1
=A1-DATE(YEAR(TODAY())-1,MONTH(A1),DAY(A1))
if now is 26th July 2008
or
=TODAY()-DATE(YEAR(TODAY())-1,MONTH(A1),DAY(A1))
or if now is today
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Kwakkel" wrote in message
...
A quick question before i'm off to bed :)
I got several dates, all in the future. I'll just give an example, cause
it'll be hell to explain otherwise :p
I have a date (Belgian format) 26-07-2008 (= July 26th, 2008). Now I need
to
know how many days have past from 26-07-2004 untill now. So, day and month
stay the same and year needs to change to the year before the current one.
Then count the days untill the date now.
I need this to calculate accrued intrest, should someone wonder (or if
that
makes it easier to understand ;) )
Preferably, a short function (if possible) since it needs to be integrated
into a larger function within Excel 2003.
Thanks in advance and good night :)
|