<?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 Re: Reading DateTime from csv file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474805#M177286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find the solution, close the discussion by marking the comment as answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2013 05:17:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-27T05:17:54Z</dc:date>
    <item>
      <title>Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474802#M177283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, a newbie here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm reading a csv file containing a column with DateTime information, but Qlik doesn't accept it as DateTime, this is an example of the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"Fri Aug 17 02:00:00 CEST 2012"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"Wed Aug 01 02:00:00 CEST 2012"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"Sat Aug 04 02:00:00 CEST 2012"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get this data accepted as DateTime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francisco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 03:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474802#M177283</guid>
      <dc:creator />
      <dc:date>2013-09-25T03:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474803#M177284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeStamp(MakeDate(Right(YourField,4),Num(Month(Date#(Mid(YourField,5,3),'MMM'))),Mid(YourField,9,2)) + Time#(Mid(YourField,12,8),'hh:mm:ss')) as DateTime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from &amp;lt;&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess some simpler expression can be worked out though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 04:44:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474803#M177284</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-09-25T04:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474804#M177285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 04:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474804#M177285</guid>
      <dc:creator />
      <dc:date>2013-09-27T04:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474805#M177286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find the solution, close the discussion by marking the comment as answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 05:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474805#M177286</guid>
      <dc:creator />
      <dc:date>2013-09-27T05:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474806#M177287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I see that the information that I sent in the first post in this thread was not enough to obtain an answer that I can use due to my lack of experience:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really the data in my CSV file is a crosstable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[header 3 lines]&lt;/P&gt;&lt;P&gt; Hora/Fecha,"15MT3 (121)","15MT3 (122)"&lt;/P&gt;&lt;P&gt;Wed Aug 01 02:00:00 CEST 2012,"113.1","84.1"&lt;/P&gt;&lt;P&gt;Thu Aug 02 02:00:00 CEST 2012,"116.1","84.8"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the wizard I could unpivot and load the data quite well skipping the 3 first lines (header) and using the data in the&amp;nbsp; 4th line as column names , but the first column Hora/Fecha in english (Time/Date) is used as a string, and I don't know how to modify the wizard generated script using the information that tresesco kindly provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script generated by the wizard is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET DecimalSep='.';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET MoneyDecimalSep='.';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET MoneyFormat='#.##0,00 €;-#.##0,00 €';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET TimeFormat='hh:mm:ss';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET DateFormat='DD/MM/YYYY';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;SET DayNames='lun;mar;mié;jue;vie;sáb;dom';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;CrossTable(Inversor, kWh)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;LOAD [Hora/Fecha], &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [15MT3 (121)], &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [15MT3 (122)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;&lt;D&gt;&lt;/D&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial; font-size: small;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;(txt, utf8, embedded labels, delimiter is ',', msq, header is 3 lines);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 14:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474806#M177287</guid>
      <dc:creator />
      <dc:date>2013-09-27T14:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474807#M177288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;datetime#([Hora/Fecha],'WWW MMM DD HH:MM:SS GMT YYYY') as [Hora/Fecha]&lt;/P&gt;&lt;P&gt;from file.csv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 14:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474807#M177288</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-27T14:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474808#M177289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to work as long as you have only one timezone (CET/CEST):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13802941908829602" jivemacro_uid="_13802941908829602" modifiedtitle="true"&gt;
&lt;P&gt;=timestamp(timestamp#(mid(replace(replace(&amp;lt;Field&amp;gt;, 'CEST ', ''), 'CET ', ''), 5), 'MMM DD hh:mm:ss YYYY'))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have to handle more timezones you will need more replace() actions..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 15:05:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474808#M177289</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-27T15:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474809#M177290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where should I insert your code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 16:11:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474809#M177290</guid>
      <dc:creator />
      <dc:date>2013-09-27T16:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Reading DateTime from csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474810#M177291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13803072484187566" jivemacro_uid="_13803072484187566" modifiedtitle="true"&gt;
&lt;P&gt;MyTable:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;timestamp(timestamp#(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mid(replace(replace(&amp;lt;Field&amp;gt;, 'CEST ', ''), 'CET ', ''), 5), 'MMM DD hh:mm:ss YYYY')) as MyField&amp;nbsp; &lt;/P&gt;
&lt;P&gt;FROM MyFile.csv (...);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 18:41:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reading-DateTime-from-csv-file/m-p/474810#M177291</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-09-27T18:41:56Z</dc:date>
    </item>
  </channel>
</rss>

