You are viewing limited content. For full access, please sign in.

Question

Question

time calculations

asked on November 25

Forms Ver 11.0
I have a simple time sheet that is calculating the number of hours worked for each day of the week. And then gives the total hours for the entire week. I'm needing to convert the Weekly Total field to a time format of HH:MM instead of a decimal result. i.e 15.3 Hrs. Is there a built in function I'm missing, or perhaps something in javascript? 

Screenshot 2024-11-25 131210.png
0 0

Answers

APPROVED ANSWER
replied on November 26

I'm assuming your Total Hours field is a text field in which case the following formula (replace the variable) should work for you:

Floor just grabs the integer portion of the total as hours
Mod(Num#, 1) grabs the decimal portion of the total which multiplied by 60 gets you your minutes

=CONCATENATE(
  FLOOR(SUM(My_Table.Daily_Tot)), 
  ":",
  MULT(
   MOD(SUM(My_Table.Daily_Tot), 1), 60
  )
)

 

1 0
replied on November 26

Thanks Zachary, I'll give it a try! I'll come back and mark this as resolved once I test...

0 0
SELECTED ANSWER
replied on November 26

Thanks again. worked like a charm!

2 0
SELECTED ANSWER
replied on November 26

Thanks again. worked like a charm!

2 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.