Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

decimal to mm:ss

BendMaster150
Level 2
Level 2

I have done a whole bunch of searches. Seen lots of posts but doesn't help what i am trying to do. I have many drop down fields that will equal different number values(Seconds) At the end of the form I have a field where it uses formcalc to sum all the fields. I then want to convert that totaled decimal number to mm:ss format.

1 Accepted Solution
radzmar
Correct answer by
Level 10
Level 10

To display the result you should use a text field instead.

View solution in original post

4 Replies
radzmar
Level 10
Level 10

Hi,

that's quite simple:

var iSeconds = SummaryField ;replace with the name of your summary field

var iMin = Floor(iSeconds / 60)

var iSec = Mod(iSeconds, 60)

$ = Concat(Format("99",iMin), ":", Format("99",iSec)) ; display results in format mm:ss

BendMaster150
Level 2
Level 2

Thanks!

I tried that however I'm not sure I'm applying it correctly. All the fields i have are numeric fields not time fields. Do I have to force a display pattern to my totaling numeric field?

radzmar
Correct answer by
Level 10
Level 10

To display the result you should use a text field instead.

View solution in original post

BendMaster150
Level 2
Level 2

That worked!

Do you have one if I decided to display HH:MM:SS?