Sub ConvertTicksToTimeString(t As Long) As String
Dim days, hours, minutes, seconds As Int
days = t / DateTime.TicksPerDay
hours = (t Mod DateTime.TicksPerDay) / DateTime.TicksPerHour
minutes = (t Mod DateTime.TicksPerHour) / DateTime.TicksPerMinute
seconds = (t Mod DateTime.TicksPerMinute) / DateTime.TicksPerSecond
Return days & " days, " & NumberFormat(hours, 2, 0) & " hours, " _
& NumberFormat(minutes, 2, 0) & " minutes and " & NumberFormat(seconds, 2, 0) & " seconds"
End Sub