Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

inyeartodate: the example in HELP is wrong

Below is an example in HELP:

inyeartodate ( '2006-01-25', '2006-01-01', 0 ) returns false

I think it should be "returns true". Please advise. Many thanks

2 Replies
anbu1984
Master III
Master III

The last argument 0 indicates the year which contains basedate (here '2006-01-01')

so inyeartodate ( '2006-01-25', '2006-01-01', 0 ) checks '2006-01-25' <= '2006-01-01' which is false

its_anandrjs
Champion III
Champion III

Update now check

The statement inyeartodate ( '2006-01-25', '2006-01-01', 0 ) returns 0 means False for the statement

because in the statement 0 checks the year contains the base year or not for the arguments.

Eg:-

Check with this

=inyeartodate ( '2006-25-01', '2006-01-25', 0 ) = False

=inyeartodate ( '2006-01-01', '2006-01-25', 0 ) = True

Eg:-

=inyeartodate ( '2014-01-01', Today(), 0 )

this date checks between 2014-01-01 to till date and returns True.