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: 
microwin88x
Creator III
Creator III

Date Substraction

Hello,

I have the following table:

ID_TICKET CREATE_DATECREATE_TIMECLOSE_DATECLOSE_TIME
ID117/05/201617:52:5504/06/201602:00:12

I need to get a Field named DIFFERENCE with the following value: DD HH:MM:SS

In this case, the value would be: 18 08:07:17

Thanks!!!

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

Interval(CLOSE_DATE + CLOSE_TIME - CREATE_DATE - CREATE_TIME, 'D hh:mm:ss') as DIFFERENCE

View solution in original post

2 Replies
sunny_talwar

May be try this:

Interval(CLOSE_DATE + CLOSE_TIME - CREATE_DATE - CREATE_TIME, 'D hh:mm:ss') as DIFFERENCE

sunny_talwar

Not sure if you need a 1 in there:

Table:

LOAD *,

  Interval(CLOSE_DATE + CLOSE_TIME - CREATE_DATE - CREATE_TIME + 1, 'D hh:mm:ss') as DIFFERENCE;

LOAD * INLINE [

    ID_TICKET, CREATE_DATE, CREATE_TIME, CLOSE_DATE, CLOSE_TIME

    ID1, 17/05/2016, 17:52:55, 04/06/2016, 02:00:12

];


Capture.PNG