Level 1

0% to

Level 2

Tip /

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

View all

Level 1

Likes

0 likes

Total Posts

4 posts

0 solutions
View profile

Level 1

Likes

0 likes

Total Posts

4 posts

0 solutions
View profile
Level 1

24-02-2011

I am creating a form for staff to enter in the actual hours and minutes that they spend with a client each ses

sion and I cannot figure out how to get the time to add up correctly.  I am looking for minutes not fractions of minutes.

Example: Sarah sat with Joey for 1 hour and 25 minutes and sat with Jill for 30 minutes - must add up as 1:55

I have searched the web many times and can find nothing. Does anyone have any suggestions?

View Entire Topic

Level 1

Likes

0 likes

Total Posts

4 posts

0 solutions
View profile

Level 1

Likes

0 likes

Total Posts

4 posts

0 solutions
View profile
Level 1

11-09-2013

Hello Gene-O

Don't take this the wrong way.... buuuut your problem is in your math.  1.15 is not equal to 1 hour and 15 minutes.  1.25 is equal to 1 hour 15 minutes. 165/60 does equal 2.75 hours.

You are trying to get this type of time:  1:15 (1 hour 15 minutes - notice the colon)

You actually have to do a conversion and then re-convert it back to

I have a form with columns of time in this format HH:MM (hours are seperate column & minutes are a seperate column.)

var dMin = Page1TotalMinutes      (Page1TotalMinutes is a seperate formula in a different cell in the table)

var dHrs = Round (dMin / 60, 2)

dMin = Round( Mod(dHrs, 1) * 60)

\$.formattedValue = Concat(dHrs, ":", dMin)

if (dMin <=9) then

\$.formattedValue  = Concat(dHrs, ":0", dMin)

elseif (dMin >=10) then

\$.formattedValue = Concat(dHrs, ":", dMin)

endif

If you didn't want to use multiple cells for your formula, I could've made my Page1TotalMinutes another variable in the above code like this

var Page1TotalMinutes = sum (HoursTotal1 + MinutesTotalPage1) (But again I have HoursTotal1 & MinutesTotalPage1 in different cells that could be made into yet another variable like I did above)

Message was edited by: JillOfAllTrades72 @3:15 on 9/11/13