<?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 Num(Date) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806933#M665833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;I need the date field values as num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the records are coming as numbers but some are coming as date format.&lt;/P&gt;&lt;P&gt;I'm using the below command to make them all alike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(E_TIMESTAMP='YYYYMMDD',NUM(Floor(Date(E_TIMESTAMP))),E_TIMESTAMP) as E_TIMESTAMP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that don't help. i used LEFT(E_TIMESTAMP),8) too.but that's not sorting my prob either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions plz?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 19:21:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-16T19:21:22Z</dc:date>
    <item>
      <title>Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806933#M665833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;I need the date field values as num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the records are coming as numbers but some are coming as date format.&lt;/P&gt;&lt;P&gt;I'm using the below command to make them all alike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(E_TIMESTAMP='YYYYMMDD',NUM(Floor(Date(E_TIMESTAMP))),E_TIMESTAMP) as E_TIMESTAMP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that don't help. i used LEFT(E_TIMESTAMP),8) too.but that's not sorting my prob either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions plz?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 19:21:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806933#M665833</guid>
      <dc:creator />
      <dc:date>2015-01-16T19:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806934#M665834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can U give some examples of what your dates looks like? You can also try date#() function with the alt functions to accommodate multiple date formats like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alt(date#(FIELD, 'YYYYMMDD'), date#(FIELD, 'YYYY-MM-DD'), date#(FIELD, 'MM/DD/YYYY'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 19:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806934#M665834</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2015-01-16T19:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806935#M665835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2622"&gt;Get the Dates Right&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This link should help you understand the date functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 19:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806935#M665835</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-16T19:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806936#M665836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my date values are showing as below.&lt;/P&gt;&lt;P&gt;41847&lt;/P&gt;&lt;P&gt;41850&lt;/P&gt;&lt;P&gt;20141128&lt;/P&gt;&lt;P&gt;20141129 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means it's both in num and date format as well. I want to have them all in num format like 41847,41850 etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already used Date# though, but don't see any difference. I have to use If() here&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 21:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806936#M665836</guid>
      <dc:creator />
      <dc:date>2015-01-16T21:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806937#M665837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;41847&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;41850&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;20141128&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;20141129&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;are your values (field)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;if(len(field)&amp;gt;5, num(MakeDate(left(field,4), mid(field,5,2), Right(field,2))), field) as newfield&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 21:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806937#M665837</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-01-16T21:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806938#M665838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally got it.:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the command to get this done.&lt;/P&gt;&lt;P&gt;If(LEN(E_TIMESTAMP)&amp;gt;5,NUM(Date#(E_TIMESTAMP,'YYYYMMDD'),'#####')&lt;BR /&gt;,E_TIMESTAMP) as E_TIMESTAMP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 22:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806938#M665838</guid>
      <dc:creator />
      <dc:date>2015-01-16T22:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806939#M665839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Massimo.&lt;/P&gt;&lt;P&gt;Your expression working too.:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 22:06:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806939#M665839</guid>
      <dc:creator />
      <dc:date>2015-01-16T22:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806940#M665840</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;a shorter solution might be the usage of the alt() function, like &lt;A href="https://community.qlik.com/qlik-users/114213"&gt;jerem1234&lt;/A&gt; suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_148716_Pic1.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/75564_QlikCommunity_Thread_148716_Pic1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1421450662544414" jivemacro_uid="_1421450662544414"&gt;
&lt;P&gt;tabDates1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alt(Num(Date#(MyDate,'YYYYMMDD')),MyDate) as MyDateNum&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;MyDate&lt;/P&gt;
&lt;P&gt;41847&lt;/P&gt;
&lt;P&gt;41850&lt;/P&gt;
&lt;P&gt;20141128&lt;/P&gt;
&lt;P&gt;20141129&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of converting all dates to numbers, you could also convert all numbers to dates (for better readability) like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_148716_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/75565_QlikCommunity_Thread_148716_Pic2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14214507393381293" jivemacro_uid="_14214507393381293"&gt;
&lt;P&gt;tabDates2:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Alt(Num(Date#(MyDate2,'YYYYMMDD')),MyDate2)) as MyDateNum2&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;MyDate2&lt;/P&gt;
&lt;P&gt;41847&lt;/P&gt;
&lt;P&gt;41850&lt;/P&gt;
&lt;P&gt;20141128&lt;/P&gt;
&lt;P&gt;20141129&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&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;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 23:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806940#M665840</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-01-16T23:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806941#M665841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Marco,&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;Actually we have another transformation layer where we are converting NUM into date fields. So to keep it uniform, we have to convert into NUM instead of Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 11:24:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806941#M665841</guid>
      <dc:creator />
      <dc:date>2015-01-19T11:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Num(Date)</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806942#M665842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually you have textual representations combined with underlying numerical values if you convert to QlikView Date, Time or Timestamp. Your intermediate transformation layer should therefore work with both numerical and date input.&lt;/P&gt;&lt;P&gt;Maybe these links can help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-3102"&gt;QlikView Date fields&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right" title="http://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right&lt;/A&gt;&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;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 19:53:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Date/m-p/806942#M665842</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-01-19T19:53:27Z</dc:date>
    </item>
  </channel>
</rss>

