Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
guruprem
Partner - Creator III
Partner - Creator 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
Partner - Creator III
Partner - Creator III
Author

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.

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

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'));

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
guruprem
Partner - Creator III
Partner - Creator III
Author

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.