<?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 How to convert date format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288200#M107198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a column which is date information.&lt;/P&gt;&lt;P&gt;I need to convert it as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BEFORE(PRESENT)&lt;/P&gt;&lt;P&gt;Jan 3th 2011 12:00AM (MM DD YYYY hhhh AM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFTER(The date I would like to convert)&lt;/P&gt;&lt;P&gt;2011 01 03&amp;nbsp; (YYYY MM DD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I convert on QlikView? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Sep 2011 05:59:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-25T05:59:24Z</dc:date>
    <item>
      <title>How to convert date format</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288200#M107198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a column which is date information.&lt;/P&gt;&lt;P&gt;I need to convert it as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BEFORE(PRESENT)&lt;/P&gt;&lt;P&gt;Jan 3th 2011 12:00AM (MM DD YYYY hhhh AM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFTER(The date I would like to convert)&lt;/P&gt;&lt;P&gt;2011 01 03&amp;nbsp; (YYYY MM DD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I convert on QlikView? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2011 05:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288200#M107198</guid>
      <dc:creator />
      <dc:date>2011-09-25T05:59:24Z</dc:date>
    </item>
    <item>
      <title>How to convert date format</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288201#M107199</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;Use date command like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date( Your Date Field , 'YYYY/MM/DD' ) as Newfield&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Anand &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2011 06:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288201#M107199</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-25T06:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date format</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288202#M107200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi atsushiikari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before your could apply the date() function to format your dates,&lt;/P&gt;&lt;P&gt; you need to ensure that your date field is recognized as such by QlikView.&lt;/P&gt;&lt;P&gt; I assume your Date information field will not be recognized by QlikView,&lt;/P&gt;&lt;P&gt; mainly because you are using something like an ordinal character extension&lt;/P&gt;&lt;P&gt; for days like 1st, 2nd, 3rd, 4th, is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I believe you need to parse your date field in before applying the Date formatting, maybe something like this&lt;/P&gt;&lt;P&gt;(Instead of 'Jan 3th 2011 12:00AM' , put in your FIELDNAME into the subfield parameter):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=date(&lt;/P&gt;&lt;P&gt; date#(&lt;/P&gt;&lt;P&gt; subfield('Jan 3th 2011 12:00AM',' ',1)&lt;/P&gt;&lt;P&gt; &amp;amp;'/'&amp;amp; keepchar(subfield('Jan 3th 2011 12:00AM',' ',2),'0123456789')&lt;/P&gt;&lt;P&gt; &amp;amp;'/'&amp;amp; subfield('Jan 3th 2011 12:00AM',' ',3)&lt;/P&gt;&lt;P&gt; ,'MMM/DD/YYYY')&lt;/P&gt;&lt;P&gt; ,'YYYY MM DD')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: above expression is for use in a chart, you could use similar in the script:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;date( date#( subfield(DATEFIELD,' ',1) &amp;amp;'/'&amp;amp; keepchar(subfield(DATEFIELD,' ',2),'0123456789')&lt;/P&gt;&lt;P&gt; &amp;amp;'/'&amp;amp; subfield(DATEFIELD,' ',3) ,'MMM/DD/YYYY') ,'YYYY MM DD') as NEWDATEFIELD,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;FROM ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2011 10:24:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-convert-date-format/m-p/288202#M107200</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-25T10:24:30Z</dc:date>
    </item>
  </channel>
</rss>

