D
default105
I have a form that when I original made it, it calculated elapsedtime,
elapsedshorttime and timedecimalequiv based on two dates usings the format ie
"01/02/2005 06:30:00 AM" ([dateopen] and [dateclosed]). This added a nice
compliment to form and displayed the elapsedtime ( 1 day, 4 hours, 32
minutes, 00 seconds) and elapsedshorttime(28:32:00) and timedecequiv
(28.53333). Now I was asked to make a make a mod to the form so the user can
put in a decimal number and if the the item in question was not down the
whole time between the two fields listed previously. Since the user will be
listing the the time in decimal format, I would like to convert it to
shorttime format. I have been able to do it will this code but I have a
limitation to it. With the input 25.5 it displays (01:30:00).
Function CreateElapsedShortTime(Interval)
Dim totalhours As String
totalhours = Format$(Interval / 24, "hh:mm:ss")
CreateElapsedShortTime = totalhours
End Function
How do I allow it to calculate past 24 hours so with 25.5 it will display
25:30:00?
elapsedshorttime and timedecimalequiv based on two dates usings the format ie
"01/02/2005 06:30:00 AM" ([dateopen] and [dateclosed]). This added a nice
compliment to form and displayed the elapsedtime ( 1 day, 4 hours, 32
minutes, 00 seconds) and elapsedshorttime(28:32:00) and timedecequiv
(28.53333). Now I was asked to make a make a mod to the form so the user can
put in a decimal number and if the the item in question was not down the
whole time between the two fields listed previously. Since the user will be
listing the the time in decimal format, I would like to convert it to
shorttime format. I have been able to do it will this code but I have a
limitation to it. With the input 25.5 it displays (01:30:00).
Function CreateElapsedShortTime(Interval)
Dim totalhours As String
totalhours = Format$(Interval / 24, "hh:mm:ss")
CreateElapsedShortTime = totalhours
End Function
How do I allow it to calculate past 24 hours so with 25.5 it will display
25:30:00?