Total14Round

Round time to Hours:Minutes format regardless of number of days
Like in 80:40.
In one of my recent projects, I needed to calculate number of hours in 2-weeks span. none of the ones I had worked as I needed, so I created this one.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function Total14Round(Total14Time)
    ' Total14Time is the total number of seconds
    '        Or Basically The result from Total14Time = Total14Time + (DateTime2 - DateTime1)
    '        Total14Time = Total14Time + (EndTime - StartTime)
    Rett                        = Total14Time
    RettH                        = Fix(Round(Rett * 24)) ' Number of hours only
    RettM                        = ((Rett * 24) - RettH) * 60 ' Number of minuts only
    RettM                        = Right("00" & Round(RettM, 2), 2) ' Show minutes as 06 instead of just 6
    Rett                        = RettH & ":" & RettM
    Total14Round            = Rett
End Function

Total14Time

Views 133

Downloads 49

CodeID
DB ID