Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this statement in my load script. It is returning 366, should be 365. I am running the latest version of QlikView 12.10 R2.
LET vYearLength = DayNumberOfYear(YearEnd(Today()));
Any ideas on why this should be returning an incorrect value?
Is there a different function I should be using to determine the length of a year?
-Daniel Farrow
Hi Daniel,
That value is correct; funtion DayNumberOfYear() always uses 366 days years.
Regards,
H
So, how does one reliably determine how many days are in a given year?
This could work:
=If(Mod(Year(Today()), 4) = 0 AND Mod(Year(Today()), 100) <> 0, 366, 365)
Regards,
H
Hi,
Try this : round(YearEnd(Today())-YearStart(Today()))
Regards.