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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
atsushi_saijo
Creator II
Creator II

Let statement passes dual value as Text value?

Hi Gurus,

I have a suspicion that dual values (such as date) in let statement cannot handle it as dual value, but rather a value (typically text).

For example, if I use:

Let vTest = Date(Today(), 'YYYY-MM');

Then $(vTest) is no longer dual value, but a text string of '2016-10'. Is this correct understanding?

I would appreciate for your feedback in advance.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Variables cannot store dual values. Dual values are a QlikView (field) concept and variables came for free with the Microsoft VBScript language. It's a pity though...

VBScript variables are untyped however (variant), so I'm not sure that they only store text values. It often looks that way.

View solution in original post

2 Replies
sunny_talwar

I think you are sort of right, if the date format is not the same as the format from environmental variable, it will save it as text. That is why I usually try to store date as number in variables and then we can always convert them into date using date functions

Let vTest = Num(Today());

and then you can use it in script

Where OrderDate <= $(vTest);

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Variables cannot store dual values. Dual values are a QlikView (field) concept and variables came for free with the Microsoft VBScript language. It's a pity though...

VBScript variables are untyped however (variant), so I'm not sure that they only store text values. It often looks that way.