Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
simotrab
Creator III
Creator III

Problem with Inyeatodate()

Hi community,

I'm facing a problem with the inyeartodate() function.

http://help.qlik.com/en-US/sense/1.0/Subsystems/WorkingWith/Content/Scripting/DateAndTimeFunctions/i...

I'm trying to calculate the boolean result that inyeartodate() gives, working on two years. This means that I have some data like this:

Load

number,

date(date) as InlineDate

Inline

[number,date

1,01/02/2018

2,01/02/2017

]

;

Using those formulae:

=InYearToDate(InlineDate, now(0), 0) // for the current Year

=InYearToDate(InlineDate, now(0), -1) // for the past Year

Everything works fine.

date1.PNG

The problem is that as I try to do the same thing with some database data, the second formula does not work.

date2.PNG

The Date Field in the database is imported with the function date(), so it is tagged as date. The difference is that in the inline example the InlineDate is not tagged as ascii and text, and in the database example yes. Is it probably the problem?

Also, it bemuse me the fact that in the second example, the ...0) formula works, but the ...-1) no.

Do you have any idea to solve this?

Thanks in advance.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

3 Replies
MK_QSL
MVP
MVP

Try with

Now(1)

simotrab
Creator III
Creator III
Author

Hi Manish,

thanks for your answer. Unluckily it does not work.date3.PNG

MK_QSL
MVP
MVP

Should work. Can you provide sample data or sample app showing it's not working?

We can check and update.