Baylah Posted November 8, 2006 Posted November 8, 2006 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
Lee Smith Posted November 8, 2006 Posted November 8, 2006 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
comment Posted November 8, 2006 Posted November 8, 2006 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.
Baylah Posted November 9, 2006 Author Posted November 9, 2006 Thanks a bunch...works perfect....where does the 3600 come from? Steve
Lee Smith Posted November 9, 2006 Posted November 9, 2006 Its the number of the seconds in a day. 60 seconds x 60 minutes = 3600 HTH Lee
Baylah Posted November 9, 2006 Author Posted November 9, 2006 Thanks again, I was very needlessly using math far more complicated than that! SF
Newbies Brian Garrett Posted March 4, 2011 Newbies Posted March 4, 2011 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
comment Posted March 4, 2011 Posted March 4, 2011 See if this helps: http://fmforums.com/forum/topic/49853-time-calculations/page__p__233345#entry233345
Recommended Posts
This topic is 5071 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 accountSign in
Already have an account? Sign in here.
Sign In Now