Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

shamitshah
Contributor

Load data between 2 dates

Hi,

I have the following the script which works fine:

WHERE ([Shift Date] < Date('03/12/2017'))

I want to now only load data between 18 Nov 2017 and 3 Dec 2017. I tried the following but it is coming up with an error:

WHERE ([Shift Date] > Date('18/11/2017') AND [Shift Date] < Date('03/12/2017'))

Any ideas?

Thanks

1 Solution

Accepted Solutions
sureshqv
Esteemed Contributor III

Re: Load data between 2 dates

try this

where [Shift Date]>Date('18/11/2017') and [Shift Date]<Date('03/12/2017');

4 Replies
sureshqv
Esteemed Contributor III

Re: Load data between 2 dates

try this

where [Shift Date]>Date('18/11/2017') and [Shift Date]<Date('03/12/2017');

sureshqv
Esteemed Contributor III

Re: Load data between 2 dates

or try this

try this

where [Shift Date]>'18/11/2017' and [Shift Date]<'03/12/2017';

devarasu07
Honored Contributor II

Re: Load data between 2 dates

Hi,

try like this,

let hDate = date('18/11/2017','DD/MM/YYYY');

let dDate = date('03/12/2017','DD/MM/YYYY');

Fact:

load * from table

where date([Shift Date])>=date('$(dDate)') and date([Shift Date])<=date('$(hDate)');


Thanks,

Deva

shamitshah
Contributor

Re: Load data between 2 dates

Thanks,

That worked out.