Trying to simply compute the difference between two timestamps using a calculation similar to the one below.

This should be simple calculation since in most environments a Timestamp is just a "Time" value you can then do a simple calculation on. FileMaker is probably just fine in what it's doing, but I don't recall this calculation being difficult in the past.

Yet, the approach below doesn't seem to work regardless of what I try.

( ExecuteSQL("select max(<TS_DATE>) from <TABLE>" ; ""; "") - ExecuteSQL("select min(<TS_DATE>) from <TABLE>" ; ""; "") ) / (tried different divisors)

I've seen some CFs that have recursive solutions (???), but it's hard to believe you would need that to subtract two TimeStamps, it should only take a formula, right?

I've tried dividing by 84600 and multiples of that, but the result is not even close.

Clearly missing something here....

Thanks in advance,

- m

Well, you did not read my message, You are subtracting two strings! For FileMaker it looks like:

Try to add this to data viewer and you will get the same result. - 9199983060

I was wrong, you can not use GetAsTimeStamp() as the timestamp is in the SQL format. There are CFs which are dealing with this, or you can write your own calc. You will need to convert

"2015-10-20 15:19:57" into "10-20-2015 15:19:57"

After this try

GetAsTimestamp ("10-20-2015 15:19:57") - GetAsTimestamp("02-20-2015 13:50:17")

I am getting 5809:29:40, although I have to convert into UK format first.