5 Replies Latest reply: May 4, 2016 6:32 AM by Balaji R

# Difference between two dates by Using Networkdays() function

Hi Team,

I want to calculate the hours of difference between the below dates by using the Networkdays() formula.

But my answers are not to my expectation.

 Created Target Date Completion Date 4/5/2016 1:50:56 PM 4/7/2016 7:50:56 PM 4/20/2016 11:57:10 AM

I am very new to qlikview, your help will be much appreciated.

Kind Regards,

Balaji R

• ###### Re: Difference between two dates by Using Networkdays() function

Thanks for your suggestions, but my request is not so complicated and there is no work start time and end time in my scenario, in excel I am using the below formula to derive the answer of 262:06:14

=(NETWORKDAYS(Created,CompletionDate)-1)+MOD(CompletionDate,1)-MOD(Created,1)

I want the same answer in qlikview as well.

• ###### Re: Difference between two dates by Using Networkdays() function

Try maybe like

=Interval(NETWORKDAYS(Created,CompletionDate) -1)+Frac(CompletionDate)-Frac(Created),'h:mm:ss')

• ###### Re: Difference between two dates by Using Networkdays() function

Dear Swuehl,

This is exactly works the way I would like to see the results.

Thanks a lot for your insights.