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

Convert a dynamic variable to a date format

Hi All,

I'm trying to get a input field (vToday as below) and change it to dynamic variable(target to put to a dynamic table later)..

but somehow, the "29/10/2021" will convert to "0.00143.." as below

deekey2_0-1635478261880.png

so I try to change the vToday to "44498", then the result is my expectation.

deekey2_1-1635478304509.png

Can anyone help to find the solution, the expected input and output as below.

input :

deekey2_2-1635478642705.png

output:

deekey2_4-1635478663533.png

p.s. I have to get via dynamic var like $(vToday) so I can put to table for dynamic date range change, I tried to put vToday but the table hasn't updated :X

Thanks.

Dee

1 Solution

Accepted Solutions
Vegar
MVP
MVP

If you need to dollar expand your variable then you could try to quote it to force your string to be handled as a string, like this: '$(vToday)'

View solution in original post

2 Replies
Lisa_P
Employee
Employee

If you want to keep the date in that format use vToday rather than $(vToday).

Using the $( ) tried to evaluate the contents so it divides 29 by 10 then by 2021 giving you 0.001434933....

Vegar
MVP
MVP

If you need to dollar expand your variable then you could try to quote it to force your string to be handled as a string, like this: '$(vToday)'