calculate hours and currency

For HanDBase related topics that are not specific to one platform.

calculate hours and currency

Postby royaltiger » Wed Apr 13, 2016 2:58 pm

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.
Posts: 11
Joined: Wed Mar 16, 2016 6:29 am

Re: calculate hours and currency

Postby aa6vhDave » Thu Apr 14, 2016 10:07 am

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.
Posts: 53
Joined: Mon Aug 19, 2013 1:42 pm

Return to HanDBase General Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests