<?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 wierd in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334303#M123264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my source date format looks like this.&lt;/P&gt;&lt;P&gt;19981203&amp;nbsp;&amp;nbsp;&amp;nbsp; (YYYYMMDD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however when i bring that date and try passing thru date function, i get weird numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(saledate)as year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get numbers that is unlike year.&lt;/P&gt;&lt;P&gt;56606&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please explain what is going on.&lt;/P&gt;&lt;P&gt;&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, 01 Jun 2012 19:57:51 GMT</pubDate>
    <dc:creator>userid128223</dc:creator>
    <dc:date>2012-06-01T19:57:51Z</dc:date>
    <item>
      <title>Date format wierd</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334303#M123264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my source date format looks like this.&lt;/P&gt;&lt;P&gt;19981203&amp;nbsp;&amp;nbsp;&amp;nbsp; (YYYYMMDD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however when i bring that date and try passing thru date function, i get weird numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(saledate)as year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get numbers that is unlike year.&lt;/P&gt;&lt;P&gt;56606&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please explain what is going on.&lt;/P&gt;&lt;P&gt;&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, 01 Jun 2012 19:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334303#M123264</guid>
      <dc:creator>userid128223</dc:creator>
      <dc:date>2012-06-01T19:57:51Z</dc:date>
    </item>
    <item>
      <title>Date format wierd</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334304#M123265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QV don't recognize your date format, so it takes the number 19981203 as number of days since 1899-12-30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And 19981203 is a day in year 56606.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help QV with your date format, read the date in as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *, year(saledate) as year;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;date#(saledate,'YYYYMMDD')&lt;/STRONG&gt; as saledate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM ...;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or change the standard date format at the top of your script accordingly.&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>Fri, 01 Jun 2012 20:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334304#M123265</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-01T20:31:16Z</dc:date>
    </item>
    <item>
      <title>Date format wierd</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334305#M123266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried doing something like this but get error. FIELD NOT FOUND "INVOICE DATE" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD "SALEDATE",&lt;/P&gt;&lt;P&gt;Date( Date#( SALEDATE, 'YYYYMMDD'), 'YYYY-MM-DD') as INVOICE_DATE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;month(INVOICE_DATE)as month;&lt;/P&gt;&lt;P&gt;year(INVOICE_DATE) as year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT "SALEDATE"&lt;/P&gt;&lt;P&gt;FROM.........................................&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 21:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334305#M123266</guid>
      <dc:creator>userid128223</dc:creator>
      <dc:date>2012-06-01T21:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date format wierd</title>
      <link>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334306#M123267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, in the context of your LOAD, the input field INVOICE_DATE is not known (used in your month and year functions). That's why I used another preceding LOAD (where the field of the first load is known then). Note that even if it's called a preceding load, it's actually a following load (preceding because you write it before / in top of the second load, but the data flows from the SQL to your first LOAD to your second LOAD from bottom to top... Hm, maybe too confusing, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So either do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD *,&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;month(INVOICE_DATE)as month;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;year(INVOICE_DATE) as year;&lt;/P&gt;&lt;P&gt;LOAD "SALEDATE",&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Date( Date#( SALEDATE, 'YYYYMMDD'), 'YYYY-MM-DD') as INVOICE_DATE; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;SQL SELECT "SALEDATE"&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;FROM.........................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD "SALEDATE",&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Date( Date#( SALEDATE, 'YYYYMMDD'), 'YYYY-MM-DD') as INVOICE_DATE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;month(&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Date#( SALEDATE, 'YYYYMMDD')) &lt;/SPAN&gt;as month;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;year(&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Date#( SALEDATE, 'YYYYMMDD')&lt;/SPAN&gt;) as year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;SQL SELECT "SALEDATE"&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;FROM.........................................&lt;/P&gt;&lt;P&gt;&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>Fri, 01 Jun 2012 21:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-format-wierd/m-p/334306#M123267</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-01T21:23:11Z</dc:date>
    </item>
  </channel>
</rss>

