how do you convert numeric value to hours:minutes?

Avatar

Avatar

ristardo

Avatar

ristardo

ristardo

22-04-2010

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

Steve_L_Walker

Total Posts

1.4K

Likes

197

Correct Answer

212

Avatar

Steve_L_Walker

Total Posts

1.4K

Likes

197

Correct Answer

212
Steve_L_Walker

22-04-2010

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)

endif


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

Steve