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: 
Daniel77
Creator
Creator

How to use if statement with a Date

Hi All,

 

In my Table i need to only show data where the date is greater than the 12th May 23.

i try something like the below but am not getting the correct return. 

 

iF([Send Date]>= (12/05/2023), 'y')

 

Can anyone assist with how to use dates in If statements please?

Thank you

 

Labels (2)
1 Solution

Accepted Solutions
Daniel77
Creator
Creator
Author

I got it 

 

=IF(date#([Send Date]) >= '13/05/2023','y','n')

thanks

View solution in original post

2 Replies
Daniel77
Creator
Creator
Author

I got it 

 

=IF(date#([Send Date]) >= '13/05/2023','y','n')

thanks

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Daniel,

The best advise I can give you is to AVOID using IF functions, especially if you enclose them in any aggregation functions like SUM(), and especially if your data can get big. It kills application performance.

However, if these are not valid concerns in your case, then simply enclose the date value in single quotes:

iF([Send Date]>= ('12/05/2023'), 'y')

Check out the agenda of the Masters Summit for Qlik - you will learn many advanced development techniques, including how to avoid IF statements and how to work with dates.

Cheers,