Page 1 of 1

calculate hours and currency

PostPosted: Wed Apr 13, 2016 2:58 pm
by royaltiger
i'm trying to calculate an HH:mm field of hours worked in the day by hourly rate, to give me a total earnings figure for the day, but cannot find any clues to this formula, trying the basic formula of (F10*10)|gives me an answer of 171000. F10 field is a calculated field 4:45 " 4 hours, 45 minutes * 10 the hourly rate, being a result format of integar, which I was hoping should give an answer of something like 47.50 ??? Not overly experienced in formulas I know somebody has the answer to what seems complcated but is probably simple.

Re: calculate hours and currency

PostPosted: Thu Apr 14, 2016 10:07 am
by aa6vhDave
Time fields are actually stored as an integer number, the number of minutes since midnight.

Also, computational fields when displayed as a "Time" value are converted to a string. Subsequent computations using that field will result in an incorrect value. For example, a computational field that results in a time of "10:32" and displayed as time, when used in a subsequent computation would use "10" as its value (the string is converted to a number up to the first non-numeric character). So the secret is to make all computational fields that deal with time (or date) be displayed as integer. When you want to display the final result as a time string, you can use a separate computational field with the final result + 0, display as time.

Hope this helps.