Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JohannesBoehmer
Contributor II
Contributor II

How to add the creation date of a table

Dear colleagues, 

I´m downloading a table every day from another tool. Currently I´m adding for every day a timestamp manually. 

So for example, I download the data on 2022-04-27, I´m adding a column with that date in excel and I upload it to Qlik sense. Same for 2022-04-28, 2022-04-29, etc. 

Is it easily possible to let Qlik Sense do this in the Data Load Editor?

The SnapshotDate is currently manually added in my excel:

Reporting_Table:
LOAD
Country as "ISO-Code",
BU as Segment,
Item,
SnapshotDate,
"Bottom-Up (P06)" as "Bottum-Up",
"Bottom-Up Comments
(P06)"
FROM [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/*Reporting_table.xlsx]
(ooxml, embedded labels, table is Sheet1);

Store Reporting_Table INTO [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/Reporting_table.qvd];

Drop Table Reporting_Table;

Load * From [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/Reporting_table.qvd] (qvd);

 Can someone help me?

Thanks and best regards, 
Johannes

Labels (1)
1 Solution

Accepted Solutions
HugoRomeira_PT
Creator
Creator

Hello,

 

You can use the function FileTime() to get the file modification date.

 

Reporting_Table:
LOAD
Country as "ISO-Code",
BU as Segment,
Item,
 Date(Floor(FileTime()),'YYYY-MM-DD') as FileCreationDate
"Bottom-Up (P06)" as "Bottum-Up",
"Bottom-Up Comments
(P06)"
FROM [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/*Reporting_table.xlsx]
(ooxml, embedded labels, table is Sheet1);

Store Reporting_Table INTO [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/Reporting_table.qvd];

Drop Table Reporting_Table;

Load * From [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/Reporting_table.qvd] (qvd);

 

Best regards

Hugo Romeira

If the issue is solved please mark the answer with Accept as Solution.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

1 Reply
HugoRomeira_PT
Creator
Creator

Hello,

 

You can use the function FileTime() to get the file modification date.

 

Reporting_Table:
LOAD
Country as "ISO-Code",
BU as Segment,
Item,
 Date(Floor(FileTime()),'YYYY-MM-DD') as FileCreationDate
"Bottom-Up (P06)" as "Bottum-Up",
"Bottom-Up Comments
(P06)"
FROM [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/*Reporting_table.xlsx]
(ooxml, embedded labels, table is Sheet1);

Store Reporting_Table INTO [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/Reporting_table.qvd];

Drop Table Reporting_Table;

Load * From [lib://SMO_IT_FPM_CS_Folder/BDG_Tracking/Reporting_table.qvd] (qvd);

 

Best regards

Hugo Romeira

If the issue is solved please mark the answer with Accept as Solution.
If you want to go quickly, go alone. If you want to go far, go together.