Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
brucemeyers
Contributor II
Contributor II

Exclude dates

For some reason this syntax 

 

where month([Date])>=month(today())

 

is not excluding these dates

12/01/2014
11/30/2016
12/30/2016

 

the dates below are the only ones I should see.  Can you help?

11/01/2017
11/01/2018
11/02/2018
11/04/2018
11/05/2018
11/06/2018
11/07/2018
11/08/2018
11/09/2018

 

 

5 Replies
sunny_talwar

Would you be able to share a sample where this is happening?
brucemeyers
Contributor II
Contributor II
Author

In a load statement after the from script (referring to a connection and file) in the data load script 

dathu
Contributor
Contributor

Are you comparing months? what is your requirement?

Is your date field have proper date format?

 

Thiago_Justen_

Just test this:

where Date([Date],'MM')>=month(today())

Also check if the variable DateFormat in the main section is ok.
Set DateFormat='M/D/YY'; //(US format)

Set DateFormat='DD/MM/YY'; //(UK date format)

Set DateFormat='YYYY-MM-DD'; //(ISO date format)
Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
jonathandienst
Partner - Champion III
Partner - Champion III

Month(today()) = 11 and the three dates you mention have month values of 11 and 12. So the syntax you mention would not exclude those dates.

I think you need a year condition or month-year condition to exclude dates for November and December of earlier years.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein