Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
msmichael
Creator
Creator

need help on converting a date variable to integer

Hi experts,

I have a variable that is bound to a calendar, the variable now has name as vCOB_DATE and value is 43465 (Dec 31st, 2018).

I have a field call COB_DATE which has Interger type (Not Date or TimeStamp types), so values in this field are like below:

COB_DATE

20180131

20180228

...

20181231

I need to convert the variable into the integer "20181231" and use it in a set expression as a filter, but I tried below seems it does not work..

{<[COB_DATE]={"=$(num#(date(vCOB_DATE, 'YYYYMMDD')))"}

Could you please help?

Thanks!

 

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You are close. You just have the = in the wrong place. 

{<[COB_DATE]={"$(=num#(date(vCOB_DATE, 'YYYYMMDD')))"}

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You are close. You just have the = in the wrong place. 

{<[COB_DATE]={"$(=num#(date(vCOB_DATE, 'YYYYMMDD')))"}

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

msmichael
Creator
Creator
Author

Thank you Rob!