April 8, 200520 yr 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.
April 8, 200520 yr 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?
April 8, 200520 yr 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.
April 8, 200520 yr 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.
April 8, 200520 yr 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))
April 8, 200520 yr 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.
April 9, 200520 yr 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