Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

guruprem
Contributor III

Issue with using date in where clause

Hi ,

I am loading data from QVD with the following syntax. The issue is ORDER_DATE fetching data even from 2006 inspite I kept a where clause to bring only from 2009-Oct-01. Kindly help

LOAD

    ORD_HEADER_ID,

    ORDER_NUMBER,

    Date(ORDER_DATE) as ORDER_DATE,

    CUSTOMER_NO,

    SALES_PESON_ID,

    ORDER_TYPE_ID,

    NAME,

    CREATION_DATE,

    LAST_UPDATE_DATE

FROM [lib://QVDs (bi_administrator)/SALES_ORDER_HEADER.QVD]

(qvd)

WHERE ORDER_DATE >= Num(Date(01-10-2009, 'DD-MM-YYYY'));

1 Solution

Accepted Solutions
guruprem
Contributor III

Re: Issue with using date in where clause

Thanks for stepping into my rescue. I found that issue is with Date function "Date(01-10-2009, 'DD-MM-YYYY')" , when I changed it to Date#('01-10-2009', 'DD-MM-YYYY') things are okay.

2 Replies
vinieme12
Esteemed Contributor II

Re: Issue with using date in where clause

Try with Floor

LOAD

    ORD_HEADER_ID,

    ORDER_NUMBER,

    Date(ORDER_DATE) as ORDER_DATE,

    CUSTOMER_NO,

    SALES_PESON_ID,

    ORDER_TYPE_ID,

    NAME,

    CREATION_DATE,

    LAST_UPDATE_DATE

FROM [lib://QVDs (bi_administrator)/SALES_ORDER_HEADER.QVD]

(qvd)

WHERE floor(ORDER_DATE) >= Num(Date(01-10-2009, 'DD-MM-YYYY'));

guruprem
Contributor III

Re: Issue with using date in where clause

Thanks for stepping into my rescue. I found that issue is with Date function "Date(01-10-2009, 'DD-MM-YYYY')" , when I changed it to Date#('01-10-2009', 'DD-MM-YYYY') things are okay.

Community Browser