Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

issue with date variables

hi all.

i have a problem with a from and to calendars which apply dates to variables.

Both calendars are set up exactly the same way apart from the variable each calendar writes to.

the problem i am facing is that when i select a date from the From calendar, it writes the date in number format to the vFromDate variable however when i select a date from the To calendar, it writes a date in the correct DD/MM/YYYY format.

i cant see any difference at all in the set up of the variables and calendars but i need both variables to display the DD/MM/YYYY format.

can anyone help please?

4 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Try this:

Screenshot_2.jpg

florentina_doga
Partner - Creator III
Partner - Creator III

use in script date(field,'DD-MMM-YYYY') for every date field

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thanks for your replies. the number tab is set up correctly, and i can try ensuring the date is in the correct format in the script but the problem is that the dashboard reads in multiple historic QVDs (around 30 in total) so i would have to read them all in, perform the date formatting then store them back out.

i have a button that is cicked that passes the variables to the field to make the selection, is there a way i can perform the format on the button instead.? i am using a select in field with the following expression..

='>=$(vFromDate)<=$(vToDate)'

chrismtb
Creator
Creator

Chris,

This is probably a bit late (and you will have no doubt solved the issue now) but for others sake here is my response!

I had the same sort of issue - on the face of it my settings were correct for the information I was feeding in and on the date picker objects that I was using.

However when I clicked on the Change Document Format button on the number tab for one of the date picker objects it showed me that my variables were not set up to be in the date format (see below) for how they should have been:

QV properties.png

Once I had set the variable format on this tab i no longer had an issue...

Hope this helps (someone).