<?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: Show date  from date field with different date formats in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410954#M491640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expression seems to load all correct as numeric timestamps:&lt;/P&gt;&lt;P&gt;alt(timestamp#([Last parameters download date/time], 'D/M/YYYY h:m'), timestamp#([Last parameters download date/time], 'D/M/YYYY h:m:s'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use date()&amp;nbsp; function to change the format as you want:&lt;/P&gt;&lt;P&gt;date(alt(...),&amp;nbsp; 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want not just display date in that format but also discard time information, you should use floor() function before:&lt;/P&gt;&lt;P&gt;date(floor(alt(...)),&amp;nbsp; 'DD/MM/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Sep 2012 15:05:19 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2012-09-15T15:05:19Z</dc:date>
    <item>
      <title>Show date  from date field with different date formats</title>
      <link>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410952#M491638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there i get every day a csv file that contains transaction logs from different databases. Because of this the date field has many different types of date formats in it. I include the date field in the attached excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to display all of the different date formats that are include in the field, in the following format: e.g. 11/11/2012. ( 'DD/MM/YYYY').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the code i wrote applies to certain date formats, not to all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be very appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 14:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410952#M491638</guid>
      <dc:creator />
      <dc:date>2012-09-15T14:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Show date  from date field with different date formats</title>
      <link>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410953#M491639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Timestamp(&lt;/P&gt;&lt;P&gt; Alt(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Timestamp#([Timestamp],'DD/MM/YYYY hh:mm[:ss]'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Timestamp#([Timestamp],'DD-MM-YYYY hh:mm[:ss]') &lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt; ,'DD/MM/YYYY hh:mm') as Timestamp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you want it as a date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(&lt;/P&gt;&lt;P&gt; floor(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Timestamp#([Timestamp],'DD/MM/YYYY hh:mm[:ss]'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Timestamp#([Timestamp],'DD-MM-YYYY hh:mm[:ss]') &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt; ,'DD/MM/YYYY') as Date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both cases, you can have a list of different date formats inside the Alt() function. QlikVIew will try the different formats, one after another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 15:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410953#M491639</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-09-15T15:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Show date  from date field with different date formats</title>
      <link>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410954#M491640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expression seems to load all correct as numeric timestamps:&lt;/P&gt;&lt;P&gt;alt(timestamp#([Last parameters download date/time], 'D/M/YYYY h:m'), timestamp#([Last parameters download date/time], 'D/M/YYYY h:m:s'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use date()&amp;nbsp; function to change the format as you want:&lt;/P&gt;&lt;P&gt;date(alt(...),&amp;nbsp; 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want not just display date in that format but also discard time information, you should use floor() function before:&lt;/P&gt;&lt;P&gt;date(floor(alt(...)),&amp;nbsp; 'DD/MM/YYYY')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 15:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410954#M491640</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-15T15:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Show date  from date field with different date formats</title>
      <link>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410955#M491641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your quick responses!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You solved this problem for me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again guys!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 15:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410955#M491641</guid>
      <dc:creator />
      <dc:date>2012-09-15T15:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Show date  from date field with different date formats</title>
      <link>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410956#M491642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SUper thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2014 20:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-date-from-date-field-with-different-date-formats/m-p/410956#M491642</guid>
      <dc:creator />
      <dc:date>2014-10-03T20:34:47Z</dc:date>
    </item>
  </channel>
</rss>

