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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
OS92
Contributor II
Contributor II

Interval between Timestamps in one field?

Hello, 

have anyone a solution for my problem? I have a field with timestamps and now i would like calculate the difference between timestamp 1 and timstamp 2. Further then the difference between timestamp 2 and timestap 3, ... and so on. 

Unbenannt.JPG

Example: Timestamp 1: 06:00:54 - Timestamp 2: 06:03:58 = Duration: 00:03:04

best regards

oliver 

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

You can use expression like:

Interval( TimestampField - Below( totalTimestampField), <format>)         

Below() could be above() based on your sort order. 'Total' would be required or not, you can check that.

View solution in original post

3 Replies
tresB
Champion III
Champion III

And how would you like to see/represent the output? In a table with timestamp as a dimension, or ...?

OS92
Contributor II
Contributor II
Author

sorry - in a table as a key figure or dimension.

tresB
Champion III
Champion III

You can use expression like:

Interval( TimestampField - Below( totalTimestampField), <format>)         

Below() could be above() based on your sort order. 'Total' would be required or not, you can check that.