# Yet another "ROUND" question

This topic is 2339 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

• Newbies

Folks,

I just discovered this wonderful site this morning. I did spend some time (probably not enough) looking through the posted questions & solutions but failed to find an answer to a small but annoying problem. I am the Volunteer Coordinator for our local police department. When I came onboard 6 years ago they were still in the 20th century - data was mostly all on paper with regard to keeping track of volunteer hours. I was introduced to Filemaker back in the ver 4 days (mid 90s) so, although not a stranger to the app, neither am I anything more than a novice when looking at the big picture.

So years back I created us a DB to keep track of volunteer hours, vehicle miles, vehicles/radios used (and a whole lot more good stuff) that has grown into a very useful tool. I take the info off their daily activity logs and record same into the DB. Instead of putting in their start and finish times, I merely put their totals in a line item field - the reason being I have not been able to figure the correct formula to get the times correct such as:

602 (ID#) starts at 0800 and finish's up at 1215. All volunteer times are rounded up to the next highest number, so 602's time should read 4.25 hours. Of course it's easy to get a calculation to give correct results such as 0800-1200= (4.0 hrs) but I just can't seem to get that .25 or .5, or .75 to come through cleanly when the times entered are not even hours. Whoops, maybe I misstated that. The times don't have to be rounded up to the next highest number, they have to reflect the "1/4" hour properly. They write their times in on the their daily log sheets in hour and 1/4 hour increments, the "total" hour calculation has to reflect this.

My field names are simple enough: Start (number field), Finish (number field) then Total (number field with more tried calculations than I can remember). No doubt this is way too simple for you folks, but at 72yo I just don't think quite as clearly as I used to so I sure would like some help figuring this out. We do use the 24 hour time format on the log sheets but not in the DB - just numbers such as 1200-1600  - I tried to do this using the time fields but I really got messed up doing that so I went back to number fields.

Thanks so much (The user name says it all..)

ps: My version is 8.0. I know its old but so am I, and it works for me.

Edited by Data Dud
##### Share on other sites

I cannot figure out what your question is. The title says it's another "ROUND" question, but then you say it isn't.

If I am guessing (!) correctly, you want to make Total a calculation field (result is Number) =

```Let ( [
startTime = Time ( Div ( Start ; 100 ) ; Mod ( Start ; 100 ) ; 0 ) ;
endTime = Time ( Div ( Finish ; 100 ) ; Mod ( Finish ; 100 ) ; 0 ) ;
duration = endTime - startTime
] ;
duration / 3600
)```

##### Share on other sites

• Newbies
34 minutes ago, comment said:

I cannot figure out what your question is. The title says it's another "ROUND" question, but then you say it isn't.

If I am guessing (!) correctly, you want to make Total a calculation field (result is Number) =

```Let ( [
startTime = Time ( Div ( Start ; 100 ) ; Mod ( Start ; 100 ) ; 0 ) ;
endTime = Time ( Div ( Finish ; 100 ) ; Mod ( Finish ; 100 ) ; 0 ) ;
duration = endTime - startTime
] ;
duration / 3600
)```

Sorry for the confusion, guess I should have gone back and modified the subject matter when I discovered that it really was not a question of rounding up. You nailed it sir, don't know how long that took you (I would have never figured out that calculation) but it works absolutely spot on. Thank you for your time. If you ever find yourself on the Space Coast (FL) I'll happily buy you a donut and cup of coffee (it's a law enforcement thing..)

##### Share on other sites

This topic is 2339 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account