Hi Everyone , have a great day , take look at line below which is infact VB6 code

VB Code:
  1. duration = Format(CDate(Right(strline(UBound(strline)), Len(strline(UBound(strline))) - 12)) - CDate(Right(strline(0), Len(strline(0)) - 12)), "HH:MM:SS")

Problem is that whenever value of duration exceeds 24 ( one complete day ) it sorta skips 24 , like

in actual scenario value of duration is 31:06 , but it only shows 07:06 , what should i do ? since its VB6 code so i dont know any other format besides " HH:MM:SS" , which i have already given
Regards