Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
in my QlikView script I want to store a table as .csv file.
Later in my script I want to reload all stored files.
Therefore each stored file must have a distinct filename.
To solve this problem I set a variable with the timestamp (now()). As the script runs twice a day date(today()) doesn't work as variable because the first file stored at that day would be overwritten with the second run of the script.
It was possible to store the file as I set date(today()) as variable:
LET vDate = Date(today(1), 'DD-MM-YYYY');
store BelegungBesetzung_Store into \\...\StoreTabellen\$(vDate)_BelegungBesetzung.csv (txt);
But as I mentioned I need the time in the filename as well.
Therefore I tried the following:
1)
LET vTime = now();
store BelegungBesetzung_Store into \\...\StoreTabellen\$(vTime)_BelegungBesetzung.csv (txt);
2)
LET vTime = Timestamp(Now(),'DD-MM-YYYY hh:mm:ss');
store BelegungBesetzung_Store into \\...\StoreTabellen\$(vTime)_BelegungBesetzung.csv (txt);
Both of them didn't work and the following error message was shown:
File not found error
Cannot open file: '\\...Store Tabellen\03.02.2022 10:44: 51_BelegungBesetzung.csv'
System error: Failed to open file in write mode for file \\...Store Tabellen\03.02.2022 10:44: 51_BelegungBesetzung.csv
Again: I need to store the table into a csv-file but everytime with a different name. I thought a timestamp works for this, but maybe it can also be solved differently.
Can anyone please help me with this problem?
Thank you in advance!
Best regards
Diana
Colons are not allowed in filenames! Therefore try for example:
LET vTime = Timestamp(Now(),'DD-MM-YYYY hhmmss');
may be below link will help you....
https://community.qlik.com/t5/QlikView-Documents/Store-Qvd-file-with-Timestamp-value/tac-p/1481659
Hi @anat,
thanks for your reply!
I already tried this before I posted my question in this forum, but unfortunately it didn't work.
Do you have another idea how to solve my problem?
Colons are not allowed in filenames! Therefore try for example:
LET vTime = Timestamp(Now(),'DD-MM-YYYY hhmmss');