Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

If function returns false when comparing 2 dates

Hello everyone,

I'm trying to compare two dates together, and even though the dates seems to be the same when displayed in a "Text & image" chart, the IF function returns that they're not the same.

Here is what's returned inside each textbox:

1.png

Object 1 expression is:

=Today()

Object 2 expression is:

=Date(Comments_FileTime)

Object 3 expression is:

=If(Date(Comments_FileTime) = Today(), '1', '0')

What am I doing wrong here?

Thank you guys for your time,

LesJean

Labels (3)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Hi

probably Comments_FileTime has time.

Try to use Date(Floor(Comments_FileTime))

View solution in original post

3 Replies
Highlighted
Partner
Partner

Hi

probably Comments_FileTime has time.

Try to use Date(Floor(Comments_FileTime))

View solution in original post

Highlighted
Partner
Partner

try

if(Date#( Comments_FileTime,'YYYY-MM-DD')=today(),1,0)

Highlighted
Contributor III
Contributor III

That was it StarinieriG, thanks a lot