Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
deep2021
Creator III
Creator III

Qlik sense Date format is not working

Hi All,

I am convertinf Qlikview app to qlik sense. The following date format is working fine in Qlikview but in qlik sense it is not working.

//let vPort=peek('PortLoop',$(i),'Loop1');
let vBD=peek('BDLoop',$(i),'Loop1');
let vAD=peek('AnLoop',$(i),'Loop1');

 

ML1:

LOAD ACCT_SYSTEM_PORTF_NO_PERF,
ANALYSIS_DATE,
BUSINESS_DATE_PERF
Resident PERF_TEMP Where ANALYSIS_DATE=$(vAD) and BUSINESS_DATE_PERF='$(vBD)';

When I am trying to run the code in Qlik sense, the below error message appears,

Unexpected token: '12', expected one of: ',', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', ...
The error occurred here:
MaxLoop:
LOAD ACCT_SYSTEM_PORTF_NO_PERF,
1/31/2014 >>>>>>12<<<<<<:00:00 AM as ANALYSIS_DATE

 

Could you please suggest on this.

 

 

Labels (4)
4 Replies
Chanty4u
MVP
MVP

Hi,

try this

1. use right notation in Where Clause:

WHERE (Where ANALYSIS_DATE=$(vAD));  // on numeric value

WHERE (Where ANALYSIS_DATE='$(vAD)');  // on string value

 

 

deep2021
Creator III
Creator III
Author

Hi,

I tried the above solution but still issue is there.

It is showing the same error.

My date is in the below format,

deep2021_0-1647747912120.png

 

Thanks

deep2021
Creator III
Creator III
Author

Hi,

After trying the above solution, In our case  the peek function is not working properly.

It is returning more than one value.

I tried like the below,

let vBD=num(peek('BDLoop',$(i),'Loop1'));
let vAD=num(peek('AnLoop',$(i),'Loop1'));

Thanks