Discussion board where members can get started with QlikView.
I am new to Qlikview and try to load file according to the timestamp. The file provider is sending files with similar name including timestamp it them(given below).
I just want to load the file which have latest timestamp.
Please help me out thanks in advance.
Hope this is helpful to u
LOAD Distinct FileName() as FileName,
Timestamp( Timestamp#( mid(FileBaseName(), Index(FileBaseName(), '_')+1, len(FileBaseName())),'YYYYMMDDhhmmss')) as DT_Time
(txt, codepage is 1252, no labels, delimiter is ',', msq);
Left Join (FileNames)
LOAD Timestamp(Max(DT_Time)) as DT_Time, '1' as Flag
Resident FileNames where Flag = 1;
Let vFileName = Peek('FileName', 0, 'FileToLoad');
DROP Table FileNames;
DROP Table FileToLoad;
I hope it will useful,
//File Names SensorData_20160101090000 and SensorData_20160101100000
LOAD Max(FileTimeStamp) as MaxTimeStamp;
LOAD Subfield(Subfield(FileName(),'_',2),'.',1) as FileTimeStamp
(ooxml, embedded labels, table is Sheet1);
(ooxml, embedded labels, table is Sheet1)
DROP Table SensordataLatest;
Thanks Payal...the code is working as expected
If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).
If not, please make clear what part of this topic you still need help with .