Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Strange result when applying date function on variable

When running the following script, the contents of DateEndDateForumla and DatevEndDate are not the same. What am I doing wrong? I would like to be able to trust the vTSEndDate variable in all contexts.

Let vTSEndDate = num(MonthEnd(AddMonths(Today(),-1,0)),'0');

checktable:
Load
num(MonthEnd(AddMonths(Today(),-1,0)),'0') as EndDateFormula
,$(vTSEndDate) As vEndDate
,date(num(MonthEnd(AddMonths(Today(),-1,0)),'0'),'YYYYMMDD') as DateEndDateFormula
,date($(vTSEndDate),'YYYYMMDD') As DatevEndDate
Autogenerate 1;



1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Please find the attached QV file.

Regards,

Ravi

View solution in original post

2 Replies
Not applicable
Author

Hi,

Please find the attached QV file.

Regards,

Ravi

Not applicable
Author

So it should be "Se"t instead of "Let"! Thanks a lot Wilted Flower