Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I found this in the documentation :
InYearToDate ( date, basedate , shift [, first_month_of_year = 1] )
returns true if date lies inside the part of year containing basedate up until and including the last millisecond of basedate. The year can be offset by shift. Shift is an integer, where the value 0 indicates the year which contains basedate. Negative values in shift indicate preceding years and positive values indicate succeeding years. If you want to work with (fiscal) years not starting in January, you may indicate a value between 2 and 12 in first_month_of_year.
Examples:
inyeartodate ( '2006-01-25', '2006-02-01', 0 ) returns true
inyeartodate ( '2006-01-25', '2006-01-01', 0 ) returns false
inyeartodate ( '2005-01-25', '2006-02-01', -1 ) returns true
I don't understand why the second example (bolded) returns false. Does someone understand why ? It looks like an error to me.
i believe that bold thing has no meaning .if u see the same function qlikview help u will find same thing which is not in bold.
sunil
So you agree it should return true (or... that means 1st january 2006 is not in 2006.)
I know it's one year late...
This is correct. The bold line returns false because '2006-01-25' is not in the range between the start of the year of the base date ('2006-01-01') and the base date itself.
Regards,
Michael
Hi ,
Qlikview is corrct............
The logic is '2006-01-25' lies in 2006 year but it is bigger than '2006-01-01' that is the reason it is showing false.