Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
prb
Contributor II
Contributor II

Compare dates in WHERE clause while loading data from EXCEL

Hi,

I have an error in WHERE clause - when it's commented it works fine. I probably use incorrect date format while comparing these fields. TRN_DATE in xls is stored as e.g. 2014-12-23  14:50:00 .

let vBeginningLastExecution = '2014-12-22  13:00:00';

let vBeginningNewExecution = now();

LOAD TRN_ID,

     TRN_DATE,

     LOCATION_ID,

     CUSTOMER_ID,

     STATUS_ID,

     TRN_VALUE

FROM

[2 Update with Timestamp\incremental-TStamp-DB-baza2.xlsx]

(ooxml, embedded labels, table is Transactions)

WHERE

TRN_DATE > $(vBeginningLastExecution) and

TRN_DATE <= $(vBeginningNewExecution);

Do I miss some timestamp# function or sth else?

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Try adding quotes around variables

WHERE

TRN_DATE > '$(vBeginningLastExecution)' and

TRN_DATE <= '$(vBeginningNewExecution)';

View solution in original post

1 Reply
anbu1984
Master III
Master III

Try adding quotes around variables

WHERE

TRN_DATE > '$(vBeginningLastExecution)' and

TRN_DATE <= '$(vBeginningNewExecution)';

View solution in original post