Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to find out the difference between the two dates and Based on the Result how to eliminate Sunday Dates.
For your reference i have attached the test file.
Please help me get the output.
Thanks,
set your Date & Timestamp format in script according to actual format in Data
SET DateFormat='MM/DD/YYYY';
SET TimestampFormat='MM/DD/YYYY hh:mm';
Now you can use below in script or in front
=CEIL(Interval(floor(Date1)-floor(Date2),'dd') - Div(floor(Date1)-floor(Date2),7) + (weekday(floor(Date2)) > WeekDay(floor(Date1))))
Based on your requirement ,if you want to keep current day also in count, you can either add or subtract 1 in above expression
Hi,
Please check the attached Qlikview file.
the formulas are :
Date Difference between Date1 and Date 2 :
=floor((Date1-Date2)+1)
Working Days Between Date1 and Date2 :
=networkdays(Date2,Date1)
Date Difference Ignore the Sunday :
=(floor((Date1-Date2)+1)-if(num(WeekDay(Date1))=6,floor((WeekEnd(Date1) - WeekStart(Date2)+1) / 7),floor((WeekEnd(Date1) - WeekStart(Date2)+1) / 7)-1))
Do you want to achieve it in front end or script?
set your Date & Timestamp format in script according to actual format in Data
SET DateFormat='MM/DD/YYYY';
SET TimestampFormat='MM/DD/YYYY hh:mm';
Now you can use below in script or in front
=CEIL(Interval(floor(Date1)-floor(Date2),'dd') - Div(floor(Date1)-floor(Date2),7) + (weekday(floor(Date2)) > WeekDay(floor(Date1))))
Based on your requirement ,if you want to keep current day also in count, you can either add or subtract 1 in above expression