Jump to content

Database for time calculation


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

Recommended Posts

  • Newbies

Hi. I am setting up a database for sailboat rental to calculate time at a certain rate, with one field for culmative time for each sailboat. I had it set up in excel like this:

DATE DAY FROM TO TIME USED CULMATIVE

The culmative time being a calculating field that would calculate the whole time the boat was out for a certain period, say, a month.

Transferring this out to filemaker has been a headache; I know I have to think "outside the box" but I'm having trouble with that field. FYG I used the time sheet template to start with and am changing field names within, deleting fields I don't need. Any help with the culmative field would be appreciated.

Link to comment
Share on other sites

Are you renting for part of a day, or for some number of days?

Note that date fields actually use a number to represent the actual date (for instance, today, [March 21, 2001], is 730565, whereas tomorrow will be 730566). So you can subtract the "date from" from the "date to" in a calc field that returns a number; that will show the number of days.

Time fields are based on the number of seconds since midnight. So 1:00 a.m. is 3600, noon is 43200, 5:30 p.m. is 63000, etc. You can create a calc field that equals "time to" minus "time from" and returns a time.

HTH,

Dan

P.S. There's no such word as "culmative"; the correct word is "cumulative". Pedantic of me, I know, but there it is.

Link to comment
Share on other sites

See this topic:

http://www.fmforums.com/ubb/Forum45/HTML/000150.html

The calculation I posted there will give you a days and hours result. Note that it calculates full days. That is, if the period starts at 11:00pm March 21, and finishes at 1:00am March 22, the duration would be 0 days, 2 hours. Since car rentals log time this way I'm assuming sailboat rentals work the same way. smile.gif

Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.