<?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: Problem loading date format correctly in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442891#M165094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution first in my script where I load my Sql data but realised that was not supposed to be here. Instead I created a List box and chose expresion as Field and edited as you suggested: &lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;line_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,6), 'YYMMDD') + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Time#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;line_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 6), 'hhmmss'), 'DD.MM.YYYY hh:mm:ss') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this work fine... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;111130_083241&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; looks like&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30.11.2011 08:32:41&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do the convertion in the script as possible (don't know if it is possible loading data from a sql source) but this will do for now.&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, 15 Mar 2013 13:02:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-15T13:02:13Z</dc:date>
    <item>
      <title>Problem loading date format correctly in script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442886#M165089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a database table with the following format 'YYMMDD_HHMMSS' (as an example 111130_085114).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my problem is to get qlikview to load this correctly in the script as a date and time format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody have a suggestion to solve this probably easy problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 16:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442886#M165089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-14T16:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem loading date format correctly in script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442887#M165090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=date(date#(left('111130_085114', 6) , 'YYMMDD') + Time#(right('111130_085114', 6), 'hhmmss'), 'DD/MM/YYYY hh:mm:ss TT')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace '111130_085114' to a date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 16:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442887#M165090</guid>
      <dc:creator />
      <dc:date>2013-03-14T16:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem loading date format correctly in script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442888#M165091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(Date#(Field_Name,'YYMMDD_hhmmss'),'DD-MM-YYYY hh:mm:ss') as Field_Name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 16:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442888#M165091</guid>
      <dc:creator>manideep78</dc:creator>
      <dc:date>2013-03-14T16:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem loading date format correctly in script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442889#M165092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;'YYMMDD_HHMMSS'&lt;/SPAN&gt; I called that field DateTime and I used the following in the Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the below code to extract the Date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE(SUBFIELD(DateTime,'_',1),'DD/MM/YYYY') as Date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I used the below to extract the Time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TIME(SUBFIELD(DateTime,'_',2),'HH:MM:SS') as Time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this works for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rusty!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 21:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442889#M165092</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-03-14T21:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem loading date format correctly in script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442890#M165093</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load date(dateformat) as Dateformat,Hour(dateformat) As Hour, Timestamp(dateformat,'hh mm ss') as time;&lt;/P&gt;&lt;P&gt;Load Date(date#('111130_085114','YYMMDD_hhmmss'),'DD-MM-YYYY hh:mm:ss') as dateformat AutoGenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of 111130_085114 give ur field name;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 21:46:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442890#M165093</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-03-14T21:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem loading date format correctly in script</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442891#M165094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution first in my script where I load my Sql data but realised that was not supposed to be here. Instead I created a List box and chose expresion as Field and edited as you suggested: &lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;line_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,6), 'YYMMDD') + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Time#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;line_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 6), 'hhmmss'), 'DD.MM.YYYY hh:mm:ss') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this work fine... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;111130_083241&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; looks like&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30.11.2011 08:32:41&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do the convertion in the script as possible (don't know if it is possible loading data from a sql source) but this will do for now.&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, 15 Mar 2013 13:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-loading-date-format-correctly-in-script/m-p/442891#M165094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-15T13:02:13Z</dc:date>
    </item>
  </channel>
</rss>

