About EasyMorph Tutorials & Examples Web-help

How to calculate time stamp differences in seconds?


#1

I have two time stamp (not Date) columns and need to calculated the differences in second. I cannot find a function similar to date_diff() in MySQL in the new column transformation.


#2

Dates are just numbers in EasyMorph. One day = 1. One second is 1 / (24 * 60 * 60).

Therefore a difference between two timestamps in seconds would be

([Timestamp1] - [Timestamp2]) * 24 * 60 * 60

See this article about data types in EasyMorph: Tutorial:Type system and expressions.


#3

Thank you. It totally makes sense to me now. The article mentioned “Date” data type and not “Timestamp”. I thought Timestamp may work differently.

Thanks again for the quick reply.

Btw, this is great product for the value. Got a subscription a few week ago. Keep up the good work.


#4

Thank you @Raymond_Wong!