Forum Discussion

lamysroe's avatar
lamysroe
Icon for Advocate I rankAdvocate I
7 years ago
Solved

Time format hh:mm adding an hour

I have columns that were orignally in milleseconds and were calculated into decimal hours. From there I used the following to get the duration into hh:mm format. It worked for half of the columns, bu...
  • Icey's avatar
    7 years ago

    Hi lamysroe ,

    You can change your Column like this:

    1st response bhrs hh:mm 2 =
    VAR hourNo =
        INT ( [Avg First Response Time Bhrs Calculated] / 60 )
    VAR minuteNO =
        INT ( MOD ( [Avg First Response Time Bhrs Calculated], 60 ) )
    VAR secondNo =
        INT (
            (
                [Avg First Response Time Bhrs Calculated]
                    - INT ( [Avg First Response Time Bhrs Calculated] )
            ) * 60
        )
    RETURN
        FORMAT ( hourNo, "#00" ) & ":"
            & FORMAT ( minuteNO, "#00" ) & ":"
            & FORMAT ( secondNo, "#00" )

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.