Thanks
The tricky part of that is that some of the units of the difference
are variable length, so the precise meaning of the fractional part
would be hard to define. You can get down to days, though, as the
unit, so maybe that is close enough.
The alternative is to just consider years as 365.25 days (or a finer
adjustment if you really care about the 100 and 400 year exceptions)
and subtract the dates. It's the difference between being old enough
to drink and a statistical measure of age.
HTH,
Jon Peck
(designer of datediff)
> On Aug 30, 12:26 pm, Allen <jazzg...@aol.com> wrote:
>> The date diff function as you know truncates the results but if you
>> need to ID a median value after the fact and the
>> fractional amount is relevant, does anyone know if a fractional result
>> can be pulled from a date diff's results?
>
> The tricky part of that is that some of the units of the difference
> are variable length, so the precise meaning of the fractional part
> would be hard to define. You can get down to days, though, as the
> unit, so maybe that is close enough.
To get the difference between dates in days, just calculate
(date2 - date1) / (60 * 60 * 24).
--
Ben Pfaff
http://benpfaff.org
Comp diff_days=Ctime.days(Date2-Date1).