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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of Difference between two dates (in seconds)

Hi All,

I am trying to calculate the sum the difference between two dates in seconds. But i am unable to calculate the correct result when i am adding them using sum(). There is a difference when i add it manually and when i use the sum() function.

Expression i am using: sum(interval(END_DATETIME-START_DATETIME,'ss'))

Please suggest how can i resolve this.

2 Replies
jagan
Partner - Champion III
Partner - Champion III

HI,

Try like this

=sum(END_DATETIME-START_DATETIME) * 24 * 60 * 60


Hope this helps you.


Regards,

jagan.



tamilarasu
Champion
Champion

Hi,

I assume your date format as DD/MM/YYYY hh:mm.

Interval(Timestamp#(END_DATETIME, 'DD/MM/YYYY hh:mm')-Timestamp#(START_DATETIME, 'DD/MM/YYYY hh:mm'),'ss')