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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
dinicholls
Creator II
Creator II

'Store' QVD with current date?

Hi,

I have a simple script that stores my info into another table.

My question is, is there anyway of adding the current date to that file name? For example, and I don't know if this is the right way of doing it, but I'm hoping my example will give you the idea of what I'm trying to do!:

store Daybooks into Daybooks_+Today().qvd (QVD);

Does that make sense?!

So, if I run the app today, my QVD file would be called:

Daybooks_18-12-2014.qvd

Is there a way of doing it?

Thank you!

Di

1 Solution

Accepted Solutions
Not applicable

so something like this (not tested)

set vFileName      = 'File_Name'&'_'& date(today(),'DD-MM-YYYY');

store table into $(vFileName)(qvd);

View solution in original post

8 Replies
Not applicable

set a parameter with the desired filename and include the date in it in the desired output format

then write the file with name as the parameter

amit_saini
Master III
Master III

Diane,

you can do something like below:

Test:

LOAD

    '$(vPlant)' as Plant,

    *;

SQL SELECT

NSPCIDNR,

NTOOLNR,

NSTPNR,

NPERS_IDNR,

NLFDSTATIONNR,

NLFDMASCHNR,

NLFDLINIENR,

DTTSPROBE,

DTTSERF,

NSTPFEHLERFLAG,

DTO,

DTU,

DXQ,

//NKORRNR,

SZUSINFO1,

SZUSINFO2,

SZUSINFO3,

SZUSINFO4,

SZUSINFO5,

SZUSINFO6,

SZUSINFO7,

SZUSINFO8,

SZUSINFO9

FROM $(vPlantAutor).STICHPROBE

WHERE DTTSERF > to_timestamp('$(vLAST_LOAD_TIME)', 'DD.MM.YYYY HH24:MI:SS');

Thanks,.
AS

amit_saini
Master III
Master III

Here vLAST_LOAD_TIME= today()

Thanks,
AS

Not applicable

so something like this (not tested)

set vFileName      = 'File_Name'&'_'& date(today(),'DD-MM-YYYY');

store table into $(vFileName)(qvd);

Michiel_QV_Fan
Specialist
Specialist

A 2 step approach

1st: let vFiledate = date(today(), 'YYYY_MM_DD');

2nd

Tablename:

Load *

from .... ;

store Tablename into Tablename_to_qvd_$(vFiledate ).qvd (qvd);

sundarakumar
Specialist II
Specialist II

Hi,

PFA.

We would need the replace since we cannot use / in QVD name.

let variable=replace(today(),'/','-');

one:
load * inline
[a
1
2]
;

store one into one_$(variable).qvd(qvd);

Thans,

Sundar

Not applicable

or vFolder= 'MyFolder'& today()

then use it when storing your table, for example

store table vFolder into MyFolder.qvd(qvd)

dinicholls
Creator II
Creator II
Author

Hi Felix,

Worked wonderfully!

Thank you!!!

Another snippit of code I shall be nothing down!!

Happy Christmas / Holidays / Time Off / Doing Nothing Days, (delete as appropriate!)

Di