To convert seconds to HH:MM:SS format in a Business Objects reports, you'll need to create a new variable. In this article, we'll share the code you'll need when creating that variable.
Here's the code for a variable to convert the total course duration (seconds) object into hours, minutes and seconds.
| = If ((IsNull([Total Course Duration (seconds)])) Or([Total Course Duration (seconds)] = 0 )) Then ("00:00:00") Else FormatNumber(Floor([Total Course Duration (seconds)] /3600) ;"00") + ":" + FormatNumber(Floor(Mod([Total Course Duration (seconds)] ;3600)/60) ;"00") + ":" + FormatNumber(Mod(Mod([Total Course Duration (seconds)] ;3600) ;60) ;"00") |
This code correctly displays the object in HH:MM:SS format instead of seconds.