Discussion Board for collaboration on QlikView Scripting.
i have 2 fields : DAY MONTH
i need to calculate working days without YEAR
i.e. 09/02 i need to know number of working days from 01/01
I tried to use function nextworkingdays() but it doesn't work without a complete date filed(mm/dd/yyyy)
Can u help me pls?
Hi, the function working day needs the year because he works with this parameter.
it calculated the laboral day from each month depends of the year.
if you dont put the year, the function doesnt know what have to calculated, and the result will be incorrect
You don't know the year for your DAY MONTH values? Then I think you can't calculate the working days between two DAY MONTH combinations.
If you know the year, but it's just not available in your source data, you can create complete dates in networkdays() function, like
=networkdays(makedate(2014), makedate(2014,MONTH,DAY) )
ty for answer
is it possibile know the number of day in a year without the year information?
i.e. 01/02 is day number 2
What about leap years?
If you don't care, you can try
=makedate(2014, MONTH, DAY) - makedate(2014) +1
to get the date number,
or a little shorter:
DayNumberOfYear(makedate(2014, MONTH, DAY) )
it's not a problem, cause i need jurst a average value of woking days
So if i can calculate the day number of year without year i can resolve my problem
If you want an approximate number, you can use an assumption that five of each seven days are working days. In this case, using Stefan's expression:
=DayNumberOfYear(makedate(2014, MONTH, DAY) ) *5/7