Thanks. I will define my own rule.
Btw, is there a "standard" for this definition? Does Microsoft have a
standard for this?
"Jeremy" <(E-Mail Removed)> wrote in message
news:epu9LUL$(E-Mail Removed)...
> Decide what your rules are, then write a function. For instance, how many
> years from 1/1/04 to 12/29/04? How about 2/29/04 to 2/28/05?
>
> Does a partial year count at all?
>
> Jeremy
>
> Do you want the answer to be an integer, or would 1.67 be a possible
answer?
>
> "RH" <(E-Mail Removed)> wrote in message
> news:eP9wq7K$(E-Mail Removed)...
> > Hi,
> >
> > I would like to calculate the number of years between 2 dates. I tried
> > using the DateDiff function but I don't get the result that I want. MSDN
> > says:
> > If Interval is set to DateInterval.Year, the return value is calculated
> > purely from the year parts of Date1 and Date2.
> >
> > I would like the function to consider all of the components of the date
> (not
> > just the year portion). I have thought about just getting the number of
> days
> > and dividing by 365 but I know I would have to account for leap years.
> >
> > Any suggestions? Thanks in advance.
> >
> >
>
>
|