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

Count number of days between two dates

I am new in Qlikview.I want to calculate number of days between two dates and this date fields are not in a single table.

for example :-

'OrderDate'  is in Order Table and 'ShipmentDate' is in Shipment Table.

please help me out.

Thanks in Advance

1 Solution

Accepted Solutions
Not applicable
Author

NetWorkDays('1/12/12' , '2/11/13')

EXAMPLE--

orderdate:

LOAD * INLINE [

    id, order_date

    1, 1/1/2012

    2, 1/6/2012

    3, 1/8/2012

    4, 1/10/2012

    5, 1/11/2012

];

shipmentdate:

LOAD * INLINE [

    id, shipment_date

    1, 28/1/2012

    2, 25/6/2012

    3, 20/8/2012

    4, 15/10/2012

    5, 22/11/2012

];

THEN TAKE A PIVOT TABLE

DIMENSION--  id

                      order_date

                      shipment_date

EXPRESSION--         NetWorkDays(Floor(Date(order_date)),Floor(Date(shipment_date)))    


View solution in original post

1 Reply
Not applicable
Author

NetWorkDays('1/12/12' , '2/11/13')

EXAMPLE--

orderdate:

LOAD * INLINE [

    id, order_date

    1, 1/1/2012

    2, 1/6/2012

    3, 1/8/2012

    4, 1/10/2012

    5, 1/11/2012

];

shipmentdate:

LOAD * INLINE [

    id, shipment_date

    1, 28/1/2012

    2, 25/6/2012

    3, 20/8/2012

    4, 15/10/2012

    5, 22/11/2012

];

THEN TAKE A PIVOT TABLE

DIMENSION--  id

                      order_date

                      shipment_date

EXPRESSION--         NetWorkDays(Floor(Date(order_date)),Floor(Date(shipment_date)))