Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Date

HI All ,

Can someone please explain me how do we get the minus of two dates with an example ? ( Differance of two dates )

Thanks

1 Solution

Accepted Solutions
qlikview979
Specialist
Specialist

Do like this

   Source:-

StartdateEnddate
1/1/20171/10/2017
1/25/20171/30/2017

T1:

LOAD Startdate,

     Enddate,

     num(Interval(Enddate-Startdate)) as Difference

FROM

(ooxml, embedded labels, table is Sheet2);

Result:

Startdate  Enddate  Difference

1/1/2017   1/10/2017      9

1/25/2017   1/30/2017    5

View solution in original post

4 Replies
qlikview979
Specialist
Specialist

Interval(Enddate-Startdate)

qlikview979
Specialist
Specialist

Do like this

   Source:-

StartdateEnddate
1/1/20171/10/2017
1/25/20171/30/2017

T1:

LOAD Startdate,

     Enddate,

     num(Interval(Enddate-Startdate)) as Difference

FROM

(ooxml, embedded labels, table is Sheet2);

Result:

Startdate  Enddate  Difference

1/1/2017   1/10/2017      9

1/25/2017   1/30/2017    5

Anil_Babu_Samineni

Why can't try from your end with 2 fields like Start Date and End Date. And do simple minus operation then look how value looks like

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
antoniotiman
Master III
Master III

Hi John,

assume

SET DateFormat='DD/MM/YYYY';

In Text Object

='01/01/2017'-'15/10/2016'  ->  78

=Date(('01/01/2017')-('15/10/2016'),'MM-DD')  -> 03-18

Regards,

Antonio