Discussion board where members can get started with QlikView.
When i have defined variable as : Let vEndDate = Date(Today(), 'YYYY-MM-DD') ;
and using it as: Date($(vEndDate), 'YYYY-MM-DD') , it is giving me : 1905-06-27 as output. Can someone explain me this absurd behavior?
I ahve attached application also.
Go to Solution.
the vEndDate is already haviing a formatted date as per your let statement and you do not need to use the date function again.
use the variable directly
View solution in original post
You have to lose the $ in the formula.
Try the following:
The LET command assigns a value to the variable.
The SET command defines the variable.
As such, the formula with $ would only work if you used the SET command instead of the LET.
Your vEndDate will be stored in date format itself. Why u need to convert it again to date format?
'$(vEndDate)' is working cool but vEndDate will give error bcoz it will treat it as a field.