Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ysj
Creator
Creator

How to calculate time difference in QlikView?

Hi,

I have two fileds from QlikView session log i,e.,Timestamp,Session Start

i have calulate time difference in min,hours etc.

timediff.JPG

Please provide your thoughts.

3 Replies
sunny_talwar

Would you be able to provide this data in an Excel file? and also, what is the expected output?

stabben23
Partner - Master
Partner - Master

Hi,

try to use Interval(Timestamp-"Session Start") in Your expression

antoniotiman
Master III
Master III

Hi,

try this

Time(TimeStamp#(Replace(SubField(Timestamp,'-',1),'T',' '),'YYYYMMDD hh:mm:ss.fff')
-
TimeStamp#(Replace(SubField
([Session Start],'-',1),'T',' '),'YYYYMMDD hh:mm:ss.fff'))

e.g.

Time(TimeStamp#(Replace(SubField('20170531T07:20:57.000-0400','-',1),'T',' '),'YYYYMMDD hh:mm:ss.fff')
-
TimeStamp#(Replace(SubField('20170531T07:10:57.000-0400','-',1),'T',' '),'YYYYMMDD hh:mm:ss.fff')
)

--> 00:10:00

Regards,

Antonio