wladzinek wrote:I am not proficient in databases at all, but I was able to create my database with the majority of features I needed. I am stuck with rounding up the time. Some jobs are less than one hour, so I need to round it up to one hour and some jobs exceed one hour. I have a field calculating the amount of time, but it returns real time eg. 10 minutes, 45 minutes or 1 hour and 20 minutes etc. I am looking for the formula to calculate either the first hour or real time.
You are very close.... you only need a couple of more fields.
I am assuming that you have a field name called "Elapsed Time" which is your time calculation.
Here are the steps you will need to add
- Add a calculated field. Call it something like "Middle". The calculation is "Elapsed Time + 0"
- Add a conditional field. Call it something like "Roundup". Set the conditional formula like this, If "Middle" is less than No Field use value: 3600, Result is "No Field, use Value 3600" Else Result is "Middle"
- Add a calculated field. Use the formula of "Roundup + 0". Set the result format In Time Format.
What we are doing here is taking your time calculation, putting it into an integer field by adding 0 to the elapsed time, checking for less than an hour with the conditional field and setting it to 1 hour if less than an hour, and using the actual time if over an hour. Then the last calculation field is putting the time back into a time format.
You can hide the elapsed time field, the first calculation field (Middle) and the conditional field (Roundup). Make sure that the second calculation field is viewable because that is your new elapsed time field.