Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with time calculation

Featured Replies

If 16:00 - 14:30 = 90 minutes how can I write a formula based on two time fields that returns a result in minutes.

e.g. 3 fields

Time_out - Time_in = Elapsed_time

Essentially I would like 16:00 - 14:30 to = 90 instead of 1:30:00 which is my FMP result.

If I get the return of 90, I can then divide it by 60 to get a result of 1.5 which is my ultimate desire. The expression above returns 1.5 hours instead of 1:30.

Any help would be greatly appreciated.

Thanks,

Steve

if the day is the same for start and finish, the calculation is

(finish_Time - Start_Time) /3600

However, if you are starting and finishing on different days, you should make your fields Timestamps, or include the day start and day end in the calculation.

HTH

Lee

If I get the return of 90, I can then divide it by 60 to get a result of 1.5 which is my ultimate desire.

Divide by 3600 and make the result type Number.

  • Author

Thanks a bunch...works perfect....where does the 3600 come from?

Steve

Its the number of the seconds in a day.

60 seconds x 60 minutes = 3600

HTH

Lee

  • Author

Thanks again,

I was very needlessly using math far more complicated than that!

SF

  • 4 years later...
  • Newbies

I know I'm replying to an old post, but the thread on here is totally going down the road of what I'm trying to figure out. I'm working on a db that needs to have a start time an end time and a calculation of the total time spent working. There are some events that will be worked starting on one day and ending on the next. I'm not very clear on how I would make a user enter in the time when using Timestamps as the field. I thought Timestamps were only used through more of an auto-enter process.

Any suggestions on where I can look for sorting this part out?

Thanks in advance...

Brian

See if this helps:

http://fmforums.com/forum/topic/49853-time-calculations/page__p__233345#entry233345

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.