Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
NickHoff
Specialist
Specialist

seconds between two time stamps

I have two time stamps start and end in the format 1/1/2015 7:30:00 AM.  How do I go about getting the seconds between the two time stamps?

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

You have an internal representation of timestamps that makes it possible to just subtract one from the other.

It will still be in days so you could multiply them up to seconds: 24 hours * 60 minutes * 60 seconds = 86400

SecondsDiff = ( Timestamp1 - Timestamp2 ) * 86400

This will however make the result into a regular number - and you will not have a timestamp anymore. Using Interval() would solve that.

View solution in original post

5 Replies
sunny_talwar

Maybe like this:

Interval(StartStamp - EndStamp, 'ss')


Interval(EndStamp - StartStamp, 'ss')

petter
Partner - Champion III
Partner - Champion III

You have an internal representation of timestamps that makes it possible to just subtract one from the other.

It will still be in days so you could multiply them up to seconds: 24 hours * 60 minutes * 60 seconds = 86400

SecondsDiff = ( Timestamp1 - Timestamp2 ) * 86400

This will however make the result into a regular number - and you will not have a timestamp anymore. Using Interval() would solve that.

MarcoWedel

(TimestampEnd-TimestampStart)*86400

MarcoWedel

wow.

3 answers in the same minute ...

petter
Partner - Champion III
Partner - Champion III

It's perfect I love that - Qlik products deserve to have a highly responsive community