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: 
Not applicable

Date

hi,

i have a Calender. (1,Nov - 24 Nov)

I want all dates except of today, namely as, 1Nov - 23Nov

How do I create it?

Thanks

Regards

Benny

1 Solution

Accepted Solutions
Not applicable
Author

Something like...
Load

YourDate

From <> where date#(Yourdate, 'DDMMM') < date(today(), 'DDMMM');

View solution in original post

10 Replies
tresesco
MVP
MVP

Like:

Load

          Yourdate

From <> where Yourdate<today();

PrashantSangle

Hi,

Do it script

like

load * from tableName

where date(floor(CalendardateField))>date(today())

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

One suggestion:

While comparing(=,>,<), there is no point using a formatting function like date(), because that doesn't change the underlaying number and hence no change in comparison result. Therefore, we should avoid using such formatting functions during comparison to exclude unnecessary operation.

Note: This doesn't hold true while we compare in general Set Analysis, because there it's possibly a text-like comparison.

Not applicable
Author

Hi,

my Datefield means DATUM

This means,

Load Datum

From <> where Datum< Today();

Right?

PrashantSangle

Hi Tresesco,

I have gone through few cases where DateField is in text format then comparing with today() date.

You have to do formating for comparision because your date field is in text and result of today() is different.

Sometime you have to use Date#() also to execute comparision properly.

So my suggestion is if necessary use formatting.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Hi,

That(text comparison) I already mentioned. However, the way you showed "where date(floor(CalendardateField))>date(today())" doesn't definitely tell that it could be a text field, otherwise floor() would not work there. And if you use date#(), it would again get converted to a proper date field with numeric representation at the back. There too, using date() would be an over-head I guess. Isn't it so?

Not applicable
Author

Ok , i have tryed with your suggestions but it does not work

I'm still a beginner and have not so much idea

anbu1984
Master III
Master III

Can you upload sample app

Not applicable
Author

Something like...
Load

YourDate

From <> where date#(Yourdate, 'DDMMM') < date(today(), 'DDMMM');