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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

csv+where clause+string to date conversion

Hi,

I have a few questions to guys, I hope you can help on this:

attached is the csv file(in txt format cause the attachment doesn't support csv file extension)..

1. I have a csv file(read only) thats have date field(actually its a string). I want to convert it to date, I used date#() but nothing happens.

here is my script

LOAD [User ID],
[First Name],
[Last Name],
Department,
Date#(Date,'M/D/YYYY') as LogDate,
Time,
Event,
Terminal,
Remark
FROM
\\Phoenix\Qlik\report.csv
(txt, utf8, embedded labels, delimiter is ',');

2. how or where will i put the where clause in that load statement? because i want to retrieve the data between a date range.

Thanks!

12 Replies
Not applicable
Author

anyone here knows how to use where clause when loading a csv file??

thanks!

Not applicable
Author

this is my where clause:

Where [Date] Between #$(vFromDate)# AND #$(vToDate)#

johnw
Champion III
Champion III

"#...#" isn't valid QlikView syntax, and neither is "between". Try this:

WHERE Date >= $(vFromDate)
AND Date <= $(vToDate);