Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating the NetWorkDays between two timestamp fields with decimals

Hi,

I have two timestamp fields which look like the following (and I have to admit I do not understand how to interpret the timestamp field. Would appreciate some help on that also)

Date1:       43007.908263889 (which is a timestamp for 29th Sep 2017)

Date 2:      43009.826921296 (which is a timestamp for 1st October 2017)

and I also have the total time in seconds between the 2 dates 1616940

I need to calculate the NetWorkDays to two decimal places.

eg.,

D1              =          5/01/2015 11:51:36 AM

D2               =      7/01/2015 10:28:13 AM

Networkdays =          3


The actual correct value I need is 1.94 days.

I followed another thread which suggested to use the following

NetWorkDays(d1, d2) -2 + (1-frac(d1)) + frac(d2)


But I can not get this to work and I am not sure if it is because I am using the timestamp rather than a date. When I enter the timestamp into a simple NetWorkDays function it returns the correct value as a whole number.


So I am wondering if I am going to be able to achieve what I need to using the NerWorkDays function or if I am better off trying to come up with an algorithm using the total time in seconds which is also available.


Any assistance would be greatly appreciated.

1 Reply
el_aprendiz111
Specialist
Specialist

Hi,

1-option:

IntevDays.png