, pub-2479148851417979, DIRECT, f08c47fec0942fa0 Quick Tips for Mac Geeks: February 2017

Wednesday, February 15, 2017

How to Calculate Elapsed Time in Filemaker - filemaker Pro Tips

filemaker pro wikipedia

This method will work even if the end time 
is on a later date than the start time.

Your database will need 5 fields added: 

DateStart (Date) 
(Date) is the field type

DateEnd (Date) 
(Date) is the field type

TimeStart (Time) 
(Time) is the field type

TimeEnd (Time)
(Time) is the field type

ElapsedTime (Time) 
Enter this calculation in the ElapsedTime field
((DateEnd - DateStart) * 86400) + TimeEnd - TimeStart 

Also Set the Calculation result of that field to time

You can set the field result to time or Date 
in the bottom of the calculation window.

filemaker pro scripts

The ElapsedTime field will calculate the result 
Why do you set the fields to Time instead of Number..

You set the calculation result field to Time so it will
 display the time as hours:minutes:seconds. 

NOTE- FileMaker calculates time in seconds. 
The 86400 equals the number of seconds in a day. 

When you set the calculation field result to time, 
FileMaker converts the number (of seconds) to time (hours:minutes:seconds). 

When you set the calculation field to result to Number 
FileMaker calculates the difference as a number of seconds.  
86400 equals the number of seconds in a day. 
3600 equals the number of seconds hour

Adsense, pub-2479148851417979, DIRECT, f08c47fec0942fa0