<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic csv+where clause+string to date conversion in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229964#M81837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a few questions to guys, I hope you can help on this:&lt;/P&gt;&lt;P&gt;attached is the csv file(in txt format cause the attachment doesn't support csv file extension)..&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;here is my script&lt;/P&gt;&lt;P&gt;LOAD [User ID],&lt;BR /&gt; [First Name],&lt;BR /&gt; [Last Name],&lt;BR /&gt; Department,&lt;BR /&gt; Date#(Date,'M/D/YYYY') as LogDate,&lt;BR /&gt; Time,&lt;BR /&gt; Event,&lt;BR /&gt; Terminal,&lt;BR /&gt; Remark&lt;BR /&gt;FROM&lt;BR /&gt;\\Phoenix\Qlik\report.csv&lt;BR /&gt;(txt, utf8, embedded labels, delimiter is ',');&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Feb 2011 00:59:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-25T00:59:52Z</dc:date>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229964#M81837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a few questions to guys, I hope you can help on this:&lt;/P&gt;&lt;P&gt;attached is the csv file(in txt format cause the attachment doesn't support csv file extension)..&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;here is my script&lt;/P&gt;&lt;P&gt;LOAD [User ID],&lt;BR /&gt; [First Name],&lt;BR /&gt; [Last Name],&lt;BR /&gt; Department,&lt;BR /&gt; Date#(Date,'M/D/YYYY') as LogDate,&lt;BR /&gt; Time,&lt;BR /&gt; Event,&lt;BR /&gt; Terminal,&lt;BR /&gt; Remark&lt;BR /&gt;FROM&lt;BR /&gt;\\Phoenix\Qlik\report.csv&lt;BR /&gt;(txt, utf8, embedded labels, delimiter is ',');&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 00:59:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229964#M81837</guid>
      <dc:creator />
      <dc:date>2011-02-25T00:59:52Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229965#M81838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) date(date#(Date,'M/D/YYYY')) as LogDate&lt;/P&gt;&lt;P&gt;2) Between the last paren and the semicolon, I believe. If that doesn't work, you can always do a preceeding load, but I assume it works there. I've never loaded from a csv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:03:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229965#M81838</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-25T01:03:29Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229966#M81839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sir,&lt;/P&gt;&lt;P&gt;I tried your suggestion and it returned null values...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229966#M81839</guid>
      <dc:creator />
      <dc:date>2011-02-25T01:14:10Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229967#M81840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;mOngkz wrote:I tried your suggestion and it returned null values...&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Worked for me. I just downloaded your file, copied your script, removed the Remark column since it isn't in your file, changed the file name and location to the name and location on my PC, and changed the expression to the one I gave you. Perhaps your sample file does not match your actual file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229967#M81840</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-25T01:23:51Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229968#M81841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with regards to where clause qlikview pops a message telling that its a garbage after my load statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229968#M81841</guid>
      <dc:creator />
      <dc:date>2011-02-25T01:28:36Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229969#M81842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe thats one factor because this forum doesn't allow me to attach a file with a csv extension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229969#M81842</guid>
      <dc:creator />
      <dc:date>2011-02-25T01:30:09Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229970#M81843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another thing sir,&lt;/P&gt;&lt;P&gt;when I run the debugger the value of this variable is null:&lt;/P&gt;&lt;P&gt;Let me = Peek('LogDate', 0, 'DTR');&lt;/P&gt;&lt;P&gt;why is that so?? sorry if i have many questions..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:33:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229970#M81843</guid>
      <dc:creator />
      <dc:date>2011-02-25T01:33:30Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229971#M81844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;mOngkz wrote: when I run the debugger the value of this variable is null:&lt;BR /&gt;Let me = Peek('LogDate', 0, 'DTR');&lt;BR /&gt;why is that so??&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I believe only the field name is supposed to be in quotes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229971#M81844</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-25T01:42:15Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229972#M81845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;mOngkz wrote:with regards to where clause qlikview pops a message telling that its a garbage after my load statement&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Again, I tried it, and it works for me. I've attached my file in case it's helpful. The test.csv file is just your .txt file with the extension changed back to .csv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229972#M81845</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-25T01:45:13Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229973#M81846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for helping me sir john.&lt;/P&gt;&lt;P&gt;your first suggestion worked and i also changed the DateFormat that Qlikview have in the Edit Script window..&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4744.qlikme.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4744.qlikme.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;my only problem now is the where clause..&lt;/P&gt;&lt;P&gt;Thank you so much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 01:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229973#M81846</guid>
      <dc:creator />
      <dc:date>2011-02-25T01:58:58Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229974#M81847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone here knows how to use where clause when loading a csv file??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 06:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229974#M81847</guid>
      <dc:creator />
      <dc:date>2011-02-25T06:43:38Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229975#M81848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is my where clause:&lt;/P&gt;&lt;P&gt;Where [Date] Between #$(vFromDate)# AND #$(vToDate)#&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 06:48:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229975#M81848</guid>
      <dc:creator />
      <dc:date>2011-02-25T06:48:37Z</dc:date>
    </item>
    <item>
      <title>csv+where clause+string to date conversion</title>
      <link>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229976#M81849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"#...#" isn't valid QlikView syntax, and neither is "between". Try this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;WHERE Date &amp;gt;= $(vFromDate)&lt;BR /&gt; AND Date &amp;lt;= $(vToDate);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 18:47:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/csv-where-clause-string-to-date-conversion/m-p/229976#M81849</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-25T18:47:35Z</dc:date>
    </item>
  </channel>
</rss>

