elasped time problem

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Calculating Time 5
Excluding working days 3
Modules and Forms 0
Problem w/Date time function 2
decimel to short time 3
Null run-time error 3
elapsed time calculation help needed 1
Calculating Time Difference 2

Top