Dashboard - Converting Seconds duration to HH:MM:SS format

Stimulsoft BI Designer discussion
Post Reply
tbagby
Posts: 24
Joined: Mon Apr 22, 2024 1:42 pm

Dashboard - Converting Seconds duration to HH:MM:SS format

Post by tbagby »

I have an indicator on a dashboard that I would like to reflect the time duration. I have tried setting a custom text format on the box using the mask shown below, but on preview the indicator just shows the literal HH:mm:ss.
timeformatting.jpg
timeformatting.jpg (124.09 KiB) Viewed 20051 times
I also tried using the following code in a text editor on the dashboard, but it renders blank on preview. The "fsc_rep_CC_Perf_Inbound.TalkDurAvg" is a calculated column in my SQL connection.
{new TimeSpan(0,0,int.Parse(fsc_rep_CC_Perf_Inbound.TalkDurAvg))}

I found the above on ...
viewtopic.php?t=4642

Thanks!
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Dashboard - Converting Seconds duration to HH:MM:SS format

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
tbagby
Posts: 24
Joined: Mon Apr 22, 2024 1:42 pm

Re: Dashboard - Converting Seconds duration to HH:MM:SS format

Post by tbagby »

I have attached a sample with indicators showing for seconds, formatted as time and formatted as custom mask. The last two are not working. Thank you for any insights.
Attachments
DataSample.xlsx
(9.47 KiB) Downloaded 757 times
TimeFormat_DataSample.mrt
(9.89 KiB) Downloaded 567 times
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Dashboard - Converting Seconds duration to HH:MM:SS format

Post by Lech Kulikowski »

Hello,

You can add a TimeSpan calculated column with the expression:
TimeSerial(0,0,Sheet1.Handle_Time)
the Sheet1.Handle_Time column should be the long type. And then use it in the Indicator.

Thank you.
tbagby
Posts: 24
Joined: Mon Apr 22, 2024 1:42 pm

Re: Dashboard - Converting Seconds duration to HH:MM:SS format

Post by tbagby »

That works, thanks Lech!
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Dashboard - Converting Seconds duration to HH:MM:SS format

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply