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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek27031
Contributor III
Contributor III

How to add column with a current date?

Hi,
I would like to add a column with the current date in the format 'M/D/YYYY' when loading data. I tried as below but after loading the data, no date is displayed
LOAD COUNTRY,
"Report_Type",
"Part number" as "% Product ID",
"Think vs Idea",
"Inventory date",
"Inventory quantity",
'$ (vToday)' as [%Date];

SQL SELECT COUNTRY,
"Report_Type",
"Part number" as "% Product ID",
"Think vs Idea",
"Inventory date",
"Inventory quantity",
FROM "DM_EMEA_BIZ" .MS. "DASI_QS";

Thanks in advance for any tips!

Labels (1)
1 Solution

Accepted Solutions
Iswarya_
Creator
Creator

Hi @jacek27031 ,

Make sure a variable 'vToday' is created before the script like below:

Let vToday=Date(Today(),'M/D/YYYY');

Also, make sure there is no space between dollar and (

'$(vToday)' as [%Date]

View solution in original post

2 Replies
Iswarya_
Creator
Creator

Hi @jacek27031 ,

Make sure a variable 'vToday' is created before the script like below:

Let vToday=Date(Today(),'M/D/YYYY');

Also, make sure there is no space between dollar and (

'$(vToday)' as [%Date]

jacek27031
Contributor III
Contributor III
Author

Thank you so much!