Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to calculate average time between two timestamp fields

im trying to find the best way to calculate the average time taken between two timestamp fileds. i was trying to achive this during load time but i dont know how to out put a hole number ie. instead of 1 min 17 sec, i want to convert into eaither every thing in min or sec. I mean in this case i want to show 77 sec instad of 1:17sec. So i can calculate the aveage number at chart level.

look at my qvd load script and let me know how to convert SEND_DT_2_ACK_DT_HR eaither in to mintues or seconds.

Please adive is there any ulternative method available to calculate the agerage time taken between dates.

Thank you for your help.

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

You may try using the Interval() function.

For example

Interval(Interval#('1:17','mm:ss'),'ss')

returns 77

View solution in original post

2 Replies
nagaiank
Specialist III
Specialist III

You may try using the Interval() function.

For example

Interval(Interval#('1:17','mm:ss'),'ss')

returns 77

Not applicable
Author

Thank you very much for your quick responce. I have used Interval(Interval()) instand of interval(interval#()) and it is working fine.

Interval(Interval(date#(ack_dt, 'MM/DD/YYYY hh:mm:ss')- date#(send_dt,'MM/DD/YYYY hh:mm:ss'), 'mm:ss'),'ss') as SEND_DT_2_ACK_DT_HR,