) function returns unexpected value for certain dates, but works correctly for other dates in the current year. For example YearToDate(Today()-1,0,1)(check if yesterday belongs to year to date) may return 0 (FALSE) instead of the expected value -1 (TRUE).
According to the help site at https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFunctions/yeartodate.htm
, by default Year2Date function returns True for all days from 01 Jan of the current year up to and including the date of the last script execution
. If the document is reloaded before today, then days between last reload date and today are not counted as year to date.Environment:
- QlikView all versions
- Qlik Sense all versions