Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Count number of days between two dates

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)))    


1 Reply
Not applicable

Re: Count number of days between two dates

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)))