Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function TimeElapsed(dIn As Variant, dOut As Variant) As String
If dOut - dIn > 0 Then
TimeElapsed = CStr(Int(Format(dOut - dIn, "General Number"))) & " Day(s) " & DatePart("h", dOut - dIn) & " Hour(s) " & DatePart("n", dOut - dIn) & " Minute(s)"
Else
TimeElapsed = ""
End If
End Function
Public Function TimeElapsed(dIn As Variant, dOut As Variant) As Double
If dOut - dIn > 0 Then
TimeElapsed = ((CInt(Int(Format(dOut - dIn, "General Number"))) * 24) + DatePart("h", dOut - dIn)) + (DatePart("n", dOut - dIn) / 60)
Else
TimeElapsed = ""
End If
End Function
ElapsedTime: TimeElapsed([TimeFieldIn],[TimeFieldOut])