Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ganeshreddy
Creator III
Creator III

Loading

Hi All,

In the given scenario how to load only today's data, i have got txt  files in network drive which consists time stamp on their file name. Right now data structure is not matching in my script. How to resolve this.

Please find attached.

Best Regards,

Ganesh

1 Solution

Accepted Solutions
tresesco
MVP
MVP

let vdate=Date(today(),'DDMMYYYY');

LOAD sn,

     rm

FROM

TNA_$(vdate)*.txt

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

This is working fine with me. Reconfirm your code as shown above and reconfirm the path you are using.

View solution in original post

5 Replies
roger_stone
Creator III
Creator III

Your variable is defining the date wrongly - let vdate=Date(today(),MMDDYYYY)

Needs to be DDMMYYYY, and within quotes - 'DDMMYYYY'

tresesco
MVP
MVP

And,

date format should be enclosed within quotes, like:

vdate=Date(today(), 'DDMMYYYY')

ganeshreddy
Creator III
Creator III
Author

Hi Tresesco,

I agree with you piece of code, even know i am getting error like 'system cannot find the path specified' because file name consists time in the end. How to rectify this?

Regards,

Ganesh

tresesco
MVP
MVP

let vdate=Date(today(),'DDMMYYYY');

LOAD sn,

     rm

FROM

TNA_$(vdate)*.txt

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

This is working fine with me. Reconfirm your code as shown above and reconfirm the path you are using.

ganeshreddy
Creator III
Creator III
Author

Thank you Tresesco.