Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
LesJean
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 (2)
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi

probably Comments_FileTime has time.

Try to use Date(Floor(Comments_FileTime))

View solution in original post

3 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi

probably Comments_FileTime has time.

Try to use Date(Floor(Comments_FileTime))

dplr-rn
Partner - Master III
Partner - Master III

try

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

LesJean
Contributor III
Contributor III
Author

That was it StarinieriG, thanks a lot