Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help on calc. on 2 dates

Hi.

Im struggling with a problem that i need to get the numbers of days (and later on hours) between 2 dates

My code for now:

First try:

if ("Date_1" > "Date_2",networkdays("Date_1", "Date_2", '13-04-2017','14-04-2017','17-04-2017','12-05-2017','25-05-2017','05-06-2017')-1,0) as Numbers_of_days,

second try:

    if ("Date_1" > "Date_2", NetWorkDays("Date_1", "Date_2", '13-04-2017','14-04-2017','17-04-2017','12-05-2017','25-05-2017','05-06-2017')) as Numbers_of_days,

First try give only eiter a - or 0 while second gives 0 or -1

who can help me ??

1 Solution

Accepted Solutions
sunny_talwar

I think since Date_2 is smaller, it seems like it should be the first argument here. May be this:

NetWorkDays("Date_2", "Date_1", '13-04-2017','14-04-2017','17-04-2017','12-05-2017','25-05-2017','05-06-2017')


Look here for NetWorkDays

View solution in original post

2 Replies
sunny_talwar

I think since Date_2 is smaller, it seems like it should be the first argument here. May be this:

NetWorkDays("Date_2", "Date_1", '13-04-2017','14-04-2017','17-04-2017','12-05-2017','25-05-2017','05-06-2017')


Look here for NetWorkDays

Not applicable
Author

Thx.. It worked and you where right..