John, me again. Got the function working with the link you sent . Now was
wondering if it's possible to get an average from the result? I keep
getting data type mismatch(which don't surprise me). My results are like:
21d 3h
15d 5h
etc.
"21d 3h" is not a number.... it's a text string. You can't take the average
of "21d 3h" and "15d 5h" any more than you can take the average of "Bud" and
"John".
To answer your other question, a Date/Time value is a Double Float number, a
count of days and fractions of a day (times) since midnight, December 30,
1899. Subtracting two dates will give you a number of the same type; e.g.
21.125 is 21 and an eighth days, that is, 21 days and 3 hours.
To display it in that way you could use an expression such as
Fix([duration]) & "d " & Fix(24*([duration] - Fix([duration]))
This will subtract 21 from the 21.125, multiply it by 24 to get hours, and Fix
will truncate the (possibly fractional) hours to a whole number.