Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Date Value in a Variable

Hi,

I want to set a sysdate in a variable so that I can concat that variable with some prefix strings as a filename on qvd generation ?

Please suggest me idea on how to do that ?


Regards,

Sachin A.

12 Replies
spsrk_84
Creator III
Creator III

Hi,

LET vDate=Date(Today(),'DD-MM-YYYY');

LoadFirst:

LOAD

Serial,

Value

From [.\DemoTable.xlsx](ooxml,embedded labels,table is sheet1);

Store Loadfirst into Qvd_'$(vDate)'.qvd;

Try in this way ..

Rregards,

Ajay

stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

First, when setting my variable, I would format as ISO.  Either using:

let vDate = TimeStamp(Now(), 'YYYYMMDDhhmmss');

or

let vDate = Date(Now(), 'YYYYMMDD');

That way, when the file is listed, it will sort alphabetically in date order.

You will need to write a VBScript to delete any older files.

Regards,


Stephen

Not applicable
Author