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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date field

Hi

I have a field that represents a date in the format 20160401

I need to

1. Change the field so that it is recognised as a date

2. Only include the records where the date is greater than today

Labels (1)
2 Replies
sunny_talwar

May be do like this:

LOAD *

Where DateField > Today();

LOAD Date#(DateField, 'YYYYMMDD') as DateField

          OtherFields

FROM Source;

Some blogs on how to read date correctly:

Why don’t my dates work?

Get the Dates Right

swuehl
Champion III
Champion III

And to avoid the preceding load and to filter the records already at the source:

Let vCutOff = Num(Date(Today(),'YYYYMMDD'));

LOAD Date#(DateField, 'YYYYMMDD') as DateField

          OtherFields

FROM Source

WHERE DateField > $(vCutOff);