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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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