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.

Calculating time...going from PM to AM

Featured Replies

I am trying to keep track of peoples time.

I have built the necessary 'case' so the calculated time rounds to the nearest quarter hour, but if you try and go from pm to am the calculation gets wacky.

I have experimented with the MOD function as well as converting to numbers and then back to time. Anybody have any ideas?

Thanks.

What kind of wackyness are you getting? What's your calc?

  • Author

Let's say you are calculating 1pm to 3pm. take the start time and subtract it from the end time. You get 2 hours. Now, let's go from 9pm to 1am. If you subtract the start time from the end time you get 20 hours. Then what?

Not sure if this will mess up your calculation, but maybe try calculating in military time, then formatting the result to what you need it to display.

  • Author

Filemaker already uses a 24 hour format for calculating, that's why you use the MOD function to bring the hour back to a 12 hour format. If you format the field using the format selection in the menu when in layout mode you are only formatting it for viewing purposes.

Any other ideas? This is very frustrating.

Since 1am = 1:00:00 and 9pm = 21:00:00 ... 1am - 9pm = -20

try - If(TimeEnd - TimeStart > 0; TimeEnd - TimeStart; Time(24;0;0) + (TimeEnd - TimeStart))

  • Author

of course...i was using the minute and hour functions, but neglected the time function. i knew it had something to do with adding time.

thanks...i think i've got it now.

You were on the right track with the Mod() function. Knowing that the number of seconds in a day is 86400, you can use this method to calculate duration:

Mod(86400+TimeEnd-TimeStart;86400)

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.