Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I found an error in the static, analyzing the data and the script I found that the function DayNumberOfYear( )
gives a bizzare result
for example
DayNumberOfYear(Date(Date#('20180301','YYYYMMDD'),'DD/MM/YYYY'))
normally the resultat gives -> 60
012018 -> 31days 02/2018 28days 31+28+1=60
But my app shows 61 !!!
From QV Help:
The function always uses years based on 366 days.
This is expected behavior. The DayNumberOfYear() function uses years based on 366 days. That is, it considers every year to have a Feb 29 day.
-Rob
Hi,
maybe you could use some expression like
Date#('20180301','YYYYMMDD')-YearStart(Date#('20180301','YYYYMMDD'))+1
to get your expected result.
One remark regarding your initial expression, you may skip the formatting Date() function in case you only use the numerical part of your Date#() interpretation.
hope this helps
regards
Marco