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

Issue with date format in QVD (load with a FOR loop)

Hi there,

Thanks to everyone to make living this community, your knowledge and help are precious.

I have an issue with using QVD file and date formating, and I can not find a specific answer to my case.

I made a application QVW in which I load many QVD files (more than 100) with a "for" loop. Indeed, I am not able to know by advance how many QVD I would have to load (I can have 1 or more QVD by table).

Thus, I used something like :

for each vQVDName in fileliste( *.qvd)

   $(table_name):

   load * from $(qvd_name);

next vQVDName

All the QVD load perfectly, except that the dates do not appear as date but as integers . Forcing date format works however.

I searched the discussion, but I do not want to use "date#" function as it would lead to write one load instruction for each of the tables (remember: more than 100...) and, in terms of application maintenance, I think this is not optimized.

Is there a way to force date format in QVD ? Or is there a way for QV to recognized date fields (e.g by system tables)? Do you know a workaround for this issue ?

Thank you very much by advance for any help you will bring.

Romain.

3 Replies
Gysbert_Wassenaar

The way you prevent this is to make sure you give all the date values a format using the date() function before storing the date field(s) into a qvd. Once the dates have both a numeric value (the integers) and also a textual display format you can store them into a qvd and be sure to that the format will still exist when you load data from the qvd's.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for you answer Gysbert.

The point is indeed to avoid using date() function because I have planty of date fields and I would not like to force them one by one...

rbecher
MVP
MVP

But you should force the data fields in the application(s) which create the QVD files.

- Ralf

Astrato.io Head of R&D