Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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.

Posted

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?

Posted

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.

Posted

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.

Posted

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))

Posted

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.

Posted

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)

This topic is 7168 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.