i have a requirement in which i have to get time difference of two timestamp in hours and than later find an average of the hours.
i am using below query to find dif
It's easy, by converting the timestamp to hours as follows:
(24*DAYS(last_modified_datetime)+MIDNIGHT_SECONDS(last_modified_datetime)/3600) - (24*DAYS(create_datetime)+MIDNIGHT_SECONDS(create_datetime)/3600)