Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
meenakshi_m
Contributor III
Contributor III

Adding load date & time as new feild in table when appending the data table.

Hello everyone,

Appreciate your response below,

For the entire month there are files uploaded for each day and  for month end date there is more than 1 file uploaded  and the latest one(uploaded last) with same month end date is considered as final.

In order to differentiate the 2 files with same date field in the table want to add a upload date which  will help differentiate the data upload else it will be duplicated.

4 Replies
Anil_Babu_Samineni

There is an function to fetch into field of modified date in qlik (like, FileTime())

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
meenakshi_m
Contributor III
Contributor III
Author

do you  have any script on this like how do I use it can I write this data load editor.

Anil_Babu_Samineni

Did you planned incremental process for this, IF not there won't any complex script required. 

Load FileTime() as ModifiedDate From Table..;

On based above line, we can write based on needs.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Ksrinivasan
Specialist
Specialist

Hi meenakshi,

script for you:

Script:
SET vpath ='(your file path upto folder name)\Hai*.csv*';

FOR Each File in FileList('$(vpath)')

FileList:

LOAD

'$(File)' as Name,

FileTime( '$(File)' ) as FileTime

autogenerate 1;

NEXT

Let vCount = NoOfRows('FileList');

Store FileList into (your file path upto folder name)/Hai_$(vCount).CSV] (txt);

 

have  a  nice day,

k. srinivasan