<?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: Convert Number to date format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578037#M1118688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These numbers, like &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;734806,734926,735921&lt;/SPAN&gt; correspond to dates in year 3912 and later. Are you sure there is nothing wrong with the data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jan 2014 12:19:54 GMT</pubDate>
    <dc:creator>giakoum</dc:creator>
    <dc:date>2014-01-28T12:19:54Z</dc:date>
    <item>
      <title>Convert Number to date format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578034#M1118685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I Have one table Tab1 and in that i have many columns like CompName,Startdate,Enddate,CustCode,PNumber,Qty,LicenseTerm,CustCode,Status...&lt;/P&gt;&lt;P&gt;In that Status contains Acive, inactive, Expire. in my DB is status is Active then it's Start date and End date is in number format like 734806,734926,735921...&lt;/P&gt;&lt;P&gt;and for rest of all Status the date format is like '12/3/2012','11/2/2010'....&lt;/P&gt;&lt;P&gt;My requirement is i want to load Start date if Status is Active then like '12/3/2012' like as inactive, Expire statuses&lt;/P&gt;&lt;P&gt;i used following logic in scripting based on Qlikview community posts, but i'm getting errors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Status = 'Active',date(date#(99999999 - date_start,'MMDDYYYY')),Date(date_start))&amp;nbsp; as Date_start,&lt;/P&gt;&lt;P&gt;if(Status = 'Active',date(date#(99999999 - date_end,'MMDDYYYY')),Date(date_start)) as Date_end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Custcode column loading some exponential values(3.91E+15) and some error values (02/21090300/01282) and , i can't understand why it's loading like that. How can we avoid these values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please somebody look into this issue and help me on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;M V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:12:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578034#M1118685</guid>
      <dc:creator />
      <dc:date>2014-01-28T12:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Number to date format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578035#M1118686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you load your apps with only dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:13:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578035#M1118686</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-28T12:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Number to date format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578036#M1118687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Try this.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(Status = 'Active',date(date#(date_start,'MM/DD/YYYY')),Date(date_start))&amp;nbsp; as Date_start,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(Status = 'Active',date(date#(date_end,'MM/DD/YYYY')),Date(date_start)) as Date_end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OR &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;you can use this&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(Status = 'Active',date(date_start,'MM/DD/YYYY'),Date(date_start))&amp;nbsp; as Date_start,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(Status = 'Active',date(date_end,'MM/DD/YYYY'),Date(date_start)) as Date_end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-Nilesh&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578036#M1118687</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2014-01-28T12:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Number to date format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578037#M1118688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These numbers, like &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;734806,734926,735921&lt;/SPAN&gt; correspond to dates in year 3912 and later. Are you sure there is nothing wrong with the data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578037#M1118688</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-01-28T12:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Number to date format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578038#M1118689</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;What i understand from your query is that you have problem with the date format, not with the status .&lt;/P&gt;&lt;P&gt;try using the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date_start&lt;/SPAN&gt;,'DD-MMM-YYYY') as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date_start &amp;amp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date_end&lt;/SPAN&gt;,'DD-MMM-YYYY') as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date_end &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because once it converted to date format then what ever the condition you have applied ie active or inactive, QV will reflect the correct date format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 12:21:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-Number-to-date-format/m-p/578038#M1118689</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2014-01-28T12:21:24Z</dc:date>
    </item>
  </channel>
</rss>

