elasped time problem

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Happy day after thanksgiving to all!

I need some help regarding some code. I am trying to have
a Module/function that will calculate the difference
between two dates. I came up with the following:


Function ElapsedTime(Interval)

ElapsedTime = Int(CSng(Format(Interval, "m"))) & " Month
(s) " & Format(Interval, "d") & " Day(s) "

End Function

But when I test it out, as in ?ElapsedTime (#11/27/03#-
#11/28/03#). I get: 12 Month(s) 29 Day(s). I need some
help getting this to work. Thanks for taking a look at
this.
 
Back
Top