Display a number field that is defined as duration as Minutes:Seconds

I have a field that contains the milliseconds it takes a Windows machine to boot. I have changed the format of the field to duration but none of the output formats will display in minutes:seconds. The closest format to what I need is minutes but that displays the decimal minutes instead of seconds. i.e. if the boot time is 2 minutes and 30 seconds, I would like it to display as 2:30 not 2.50.

This discussion seems similar but I don't see that an issue was ever opened. Before I open an issue I want to make sure I'm not missing something obvious.

Hi @Jeff_Davis,

as I mentioned in the discussion you linked, the "Number" format supports Numeral.js's format strings, which means you can enter a time format like 00:00:00 to have your number formatted as hours:minutes:seconds.

Thanks @weltenwort, that gets me closer to what I want. Since my field contains milliseconds I created a scripted field that divides the original field by 1000 and then I was able to apply the 00:00:00 time format to that field. For my use case, I don't really need the hours but I can't figure out a way to remove it. I tried [00:]00:00 and 00:00 but neither of those change the output, it still displays the hours.

I'm still tempted to submit an enhancement request since this seems to me like it should be a function of the duration format.

I agree that duration format should support this kind of formatting. We always appreciate enhancement requests over on GitHub. The more background information you add to your request, the easier it will be for a developer to pick it up.

Thanks, I have submitted an enhancement request.

Thanks a lot!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.