<?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 Date format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-format/m-p/419473#M570208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I format my last modified date in my QVW, why does it appear like the sample attached?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2012 13:11:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-16T13:11:20Z</dc:date>
    <item>
      <title>Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format/m-p/419473#M570208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I format my last modified date in my QVW, why does it appear like the sample attached?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 13:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format/m-p/419473#M570208</guid>
      <dc:creator />
      <dc:date>2012-10-16T13:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format/m-p/419474#M570209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because QV is interpreting the number 20121012 as days since Dec 30, 1899.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to tell QV that it should be interpeted as date, and the special format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Date#(20121012,'YYYYMMDD')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will only change the numerical part of the value, but would still display 20121012. But applying a date function like year() or just date() will return correct results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Date(Date#(20121012,'YYYYMMDD'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date(Date#(LASTMODFIELD,'YYYYMMDD')) as LASTMODFIELD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 14:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format/m-p/419474#M570209</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-16T14:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format/m-p/419475#M570210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had already done this in the script. But when I format the date in a straight table to MM/DD/YYYY it returns that random number for YYYY like in my sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may have to go back to the SQL that generates the QVD that im reading and reformat the date there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 21:04:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format/m-p/419475#M570210</guid>
      <dc:creator />
      <dc:date>2012-10-16T21:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format/m-p/419476#M570211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, as I said, it's not a random number, the Date is correct for a value of 20121012.&lt;/P&gt;&lt;P&gt;I assume at any point in your load script(s) the incoming Date is formatted with format code 'YYYYMMDD', and either a pure text value (so QV just interpretes the Date as a number) or somewhere /somehow the numerical part of the Date field value gets replaced by the textual representation interpreted as number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also suggest going back to the code that reads the Date in from the source, then check that the value is correctly read in as Date and trace its transformation and load into your final application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 21:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format/m-p/419476#M570211</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-16T21:40:04Z</dc:date>
    </item>
  </channel>
</rss>

