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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

how do you convert numeric value to hours:minutes?

Level 2
Level 2

Hi guys

I need a script that converts calculated minutes to hours:minutes format

eg.  96 minutes / 60 = 1.6 hours, which i want it to then convert to 1:36 (Hour:Minutes)

any help would be great. Thanks

1 Reply
Level 10
Level 10

Give this a go....

// form1.page1.subform1.formattedTime::calculate - (FormCalc, client)

var hours = Floor(form1.page1.subform1.timeInMinutes.rawValue / 60)

var minutes = Mod(form1.page1.subform1.timeInMinutes.rawValue,60)

if (minutes < 10) then

  minutes = Concat("0",minutes)


$.rawValue = Concat(hours,":",minutes)