### Title

Calculating Average Speed in MPH

### Post

Taking a simple speed calculation, I can't seem to get FMP 7 to come up with the same result I can get in Excel.

Distance/(time*24)

20 Miles Distance Traveled

1 Hour to travel that distance

I'm trying to get FMP to come to 20 as the result. 20/1 - doesn't seem difficult unless time is formatted as "TIME". 1:00:00 - which I need in this application.

Setting it to "TIME" and my resulting figure as Average speed comes out .00555555555 MPH Which is obviously wrong without the *24. With the *24 it's .0002314814814815

I can't seem to find any reference that will help me in this area. Anyone have an idea on this? I'm sure it's just trying to relate hours/minutes/seconds in FMP differently than Excel, but for the life of me I can't figure it out.

Hi Lex262

What you need to do is convert the time field from being in time format to be in hours, you can do this by using the GetAsNumebr function to get the number of seconds and then dividing that by 3600.

This should do the trick.