<?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: Straight table sort on date/time column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-table-sort-on-date-time-column/m-p/1670574#M727661</link>
    <description>&lt;P&gt;It looks like your date field is not in proper timestamp format. Set the timestamp variable in script like below&lt;/P&gt;&lt;P&gt;SET TimestampFormat='MM/DD/YYYY h:mm:ss TT';&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt; Set the format of above variable based on the format of the field coming from source. For eg.&amp;nbsp;&lt;SPAN&gt;Scheduled_Start_date values from source is '01/23/2019 04:01:33 AM' then set the variable format as above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now in script you can format the&amp;nbsp;Scheduled_Start_date using &lt;STRONG&gt;timestamp&lt;/STRONG&gt; function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;timestamp(Scheduled_Start_date,'DD/MM/YYYY hh:mm:ss TT') as&amp;nbsp;Scheduled_Start_date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM Source;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, in chart you can simply sort this field Numerically ascending or descending&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2020 16:16:17 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-01-29T16:16:17Z</dc:date>
    <item>
      <title>Straight table sort on date/time column</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-table-sort-on-date-time-column/m-p/1670567#M727660</link>
      <description>&lt;P&gt;I have a straight table and&amp;nbsp; need to sort it as per a column which is Date/time format. I have below expression in the&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chart Properties -&amp;gt; Sort&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Date(Scheduled_Start_date,'dd/mm/yyyy hh:mm:ss')&lt;/P&gt;&lt;P&gt;And also promoted the column to the top but i am not seeing the right results.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 317px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27670iF509DF99BC3D568A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Resulting output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 150px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27671i852704F03B1F8A94/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am seeing 2 rows from 2019 on the top.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to sort this in the descending order of time&lt;/P&gt;&lt;P&gt;i.e 2020&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-table-sort-on-date-time-column/m-p/1670567#M727660</guid>
      <dc:creator>qlikvw2019</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Straight table sort on date/time column</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-table-sort-on-date-time-column/m-p/1670574#M727661</link>
      <description>&lt;P&gt;It looks like your date field is not in proper timestamp format. Set the timestamp variable in script like below&lt;/P&gt;&lt;P&gt;SET TimestampFormat='MM/DD/YYYY h:mm:ss TT';&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt; Set the format of above variable based on the format of the field coming from source. For eg.&amp;nbsp;&lt;SPAN&gt;Scheduled_Start_date values from source is '01/23/2019 04:01:33 AM' then set the variable format as above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now in script you can format the&amp;nbsp;Scheduled_Start_date using &lt;STRONG&gt;timestamp&lt;/STRONG&gt; function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;timestamp(Scheduled_Start_date,'DD/MM/YYYY hh:mm:ss TT') as&amp;nbsp;Scheduled_Start_date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM Source;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, in chart you can simply sort this field Numerically ascending or descending&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 16:16:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-table-sort-on-date-time-column/m-p/1670574#M727661</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-29T16:16:17Z</dc:date>
    </item>
  </channel>
</rss>

