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: 
arun2305
Contributor III
Contributor III

Time Difference in Numeric Format

Hi,

I want to minus two times in Qlik Sense Desktop version.

For example in Excel :

A = 08:00:56

B = 07:00:00

A-B = 0,0423148148148148

 

I want to do the same in Qlick Sense but the result is this "-". It's not finding anything.

Here are my Expressions in Qlik Sense where "vHStart" is a variable and [List.Last Resolved Time] is a field value :

vHStart = '07:00:00'

[List.Last Resolved Time] = 08:00:56

I am using this function :

Mesures = [List.Last Resolved Time]- vHStart 

 

I don't know if I am doing something, wrong?

Please help me out here.

Thank you in advance for your help.

Best regards, Arun

3 Solutions

Accepted Solutions
pradosh_thakur
Master II
Master II

this is probably because time is i string format try changing thr format using time#
time#('07:00:00','hh:mm:ss') then get the diffrence
Learning never stops.

View solution in original post

pradosh_thakur
Master II
Master II

put this in a text box and change your expression accordingly

=time#('12:12:23','hh:mm:ss')- time#('09:12:23','hh:mm:ss')

Learning never stops.

View solution in original post

pradosh_thakur
Master II
Master II

Great .. Please close the thread so that other can find this useful.
Learning never stops.

View solution in original post

7 Replies
pradosh_thakur
Master II
Master II

this is probably because time is i string format try changing thr format using time#
time#('07:00:00','hh:mm:ss') then get the diffrence
Learning never stops.
arun2305
Contributor III
Contributor III
Author

Hi Pradosh,

Thank you for your post but it's still not working.

I changed the varable into this  :

                      time#('07:00:00','hh:mm:ss')

But the result it's the same "-"

 

pradosh_thakur
Master II
Master II

put this in a text box and change your expression accordingly

=time#('12:12:23','hh:mm:ss')- time#('09:12:23','hh:mm:ss')

Learning never stops.
arun2305
Contributor III
Contributor III
Author

Just changed the expression accordingly but the result is the same "-"...

I have changed it like this :

                          time#([List.Last Resolved Time],'hh:mm:ss')- time#(vHStart,'hh:mm:ss')

Where 

                          vHStart =time#('07:00:00','hh:mm:ss')

                          [List.Last Resolved Time] = 08:00:56

pradosh_thakur
Master II
Master II

Check your time format may be . It is working for me.
Learning never stops.
arun2305
Contributor III
Contributor III
Author

It worked Pradosh 🙂

Actually I changed the expressions into this 

                  Time#([List.Last Resolved Time],'hh:mm:ss') - Time#(vHStart,'hh:mm:ss')

and the variable into this :

                   vHStart = 07:00:00

Thank you for your help and time.

Best regards, Arun

pradosh_thakur
Master II
Master II

Great .. Please close the thread so that other can find this useful.
Learning never stops.