<?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 ascii/text to date field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990432#M81908</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121051"&gt;@QFabian&lt;/a&gt;&amp;nbsp;You can get the month number with&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Month&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;left&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, 3), 'MMM'))&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;I don't think there is any need to create a mapping table.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Oct 2022 14:14:04 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2022-10-08T14:14:04Z</dc:date>
    <item>
      <title>Convert ascii/text to date field</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990361#M81892</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Having an issue converting a column from excel to a date field using Qliksense.&lt;/P&gt;
&lt;P&gt;If I look in the datamodel viewer for this particular field, "First Discovered", it shows the datatype as $ascii $text .&lt;/P&gt;
&lt;P&gt;The values in this field are as follows:&lt;/P&gt;
&lt;P&gt;Apr 1, 2022 20:45:53 EDT&lt;/P&gt;
&lt;P&gt;Apr 4, 2021 20:58:24 EDT&lt;/P&gt;
&lt;P&gt;Aug 7, 2021 18:12:29 EDT&lt;/P&gt;
&lt;P&gt;Aug 29, 2021 10:12:31 EDT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When trying to use it in this format to determine some age buckets, obviously it isnt working.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like the format to be something usable, 04/01/2022 or 09/29/2021.&lt;/P&gt;
&lt;P&gt;I have tried all sorts of date functions and formatting such as: Date("First Discovered",&amp;nbsp; 'MM/DD/YYYY'), Including Date# as well,...I have tried replacing the comma using Replace() CHR (44) into a hyphen or something... I have trimmed off the time and timezone values because it isn't really needed.&amp;nbsp; Nothing is working.&lt;/P&gt;
&lt;P&gt;I've gotten a lot of suggestions from the forums here by searching, usually coming up with the usual &lt;SPAN&gt;date(datefield,'&lt;/SPAN&gt;&lt;SPAN&gt;DD/MM/YYYY&lt;/SPAN&gt;&lt;SPAN&gt;') or&amp;nbsp;date(date#(datefield,'current format'),'DD/MM/YYYY').&amp;nbsp; Nothing is working.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 19:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990361#M81892</guid>
      <dc:creator>AnalyticsDev</dc:creator>
      <dc:date>2022-10-07T19:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ascii/text to date field</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990393#M81895</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/153869"&gt;@AnalyticsDev&lt;/a&gt;&amp;nbsp;, probably there is a function or format parameter to get it, but i made this using other functions.&lt;/P&gt;
&lt;P&gt;I used a mapping table to get the number of the text month.&lt;/P&gt;
&lt;P&gt;Data:&lt;BR /&gt;Load * INLINE [&lt;BR /&gt;Fecha&lt;BR /&gt;"Apr 1, 2022 20:45:53 EDT"&lt;BR /&gt;"Apr 4, 2021 20:58:24 EDT"&lt;BR /&gt;"Aug 7, 2021 18:12:29 EDT"&lt;BR /&gt;"Aug 29, 2021 10:12:31 EDT"&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Month:&lt;BR /&gt;mapping&lt;BR /&gt;Load * INLINE [&lt;BR /&gt;Month, MonthX&lt;BR /&gt;Apr, 4&lt;BR /&gt;Aug, 8&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Load&lt;BR /&gt;&lt;STRONG&gt;makedate(subfield(Fecha,' ', 3), applymap('Month', left(Fecha, 3)), subfield(subfield(Fecha, ',', 1), ' ', 2)) as Fecha2,&lt;/STRONG&gt;&lt;BR /&gt;subfield(Fecha,' ', 3),&lt;BR /&gt;left(Fecha, 3),&lt;BR /&gt;subfield(subfield(Fecha, ',', 1), ' ', 2)&lt;BR /&gt;Resident Data;&lt;BR /&gt;drop table Data;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 21:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990393#M81895</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2022-10-07T21:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ascii/text to date field</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990398#M81897</link>
      <description>&lt;P&gt;Once you get rid of the " EDT",&amp;nbsp; you can parse into a date/time using Date#() with the pattern&amp;nbsp; 'MMM D, YYYY h:m:s'&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;I've used&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Mid&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;,1,&lt;SPAN class="s1"&gt;index&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, ' ', -1))&lt;/FONT&gt;&lt;SPAN class="Apple-converted-space"&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt; in the example below to trim off the EDT.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;That pattern will include the time portion. If you want just the time portion, you can either apply Floor() to the result or parse just the date string portion using the Mid(Index()) technique to strip out the time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Apple-converted-space"&gt;Lastly, if you want the display format to be MM/DD/YYYY, apply a Date() function to the resulting date. Don't apply Date() to the Timestamp result -- that will display like a date only but internally it will still have the time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;Data:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Load&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s2"&gt;&amp;nbsp; Fecha&lt;/SPAN&gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; Date#&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Mid&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;,1,&lt;SPAN class="s1"&gt;index&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, ' ', -1)), 'MMM D, YYYY h:m:s') &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Timestamp&lt;/SPAN&gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; Date&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Mid&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;,1,&lt;SPAN class="s1"&gt;index&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, ' ', -1)), 'MMM D, YYYY h:m:s')), 'MM/DD/YYYY') &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;FlooredDate&lt;/SPAN&gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; Date#&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Mid&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;,1,&lt;SPAN class="s1"&gt;index&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, ' ', 3)), 'MMM D, YYYY') &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;Date&lt;/SPAN&gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp; Date&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Mid&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;,1,&lt;SPAN class="s1"&gt;index&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, ' ', 3)), 'MMM D, YYYY'), 'MM/DD/YYYY') &lt;SPAN class="s1"&gt;as&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;DateReformatted&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;[&lt;BR /&gt;Fecha&lt;BR /&gt;"Apr 1, 2022 20:45:53 EDT"&lt;BR /&gt;"Apr 4, 2021 20:58:24 EDT"&lt;BR /&gt;"Aug 7, 2021 18:12:29 EDT"&lt;BR /&gt;"Aug 29, 2021 10:12:31 EDT"&lt;BR /&gt;]&lt;/SPAN&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rwunderlich_0-1665189546570.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90909i22B2D65FB74F2793/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rwunderlich_0-1665189546570.png" alt="rwunderlich_0-1665189546570.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 00:40:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990398#M81897</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-10-08T00:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ascii/text to date field</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990400#M81898</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121051"&gt;@QFabian&lt;/a&gt;&amp;nbsp;, thank you.&amp;nbsp; It works well.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;Thank you for the additional detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Marking this as solved.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 01:22:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990400#M81898</guid>
      <dc:creator>AnalyticsDev</dc:creator>
      <dc:date>2022-10-08T01:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ascii/text to date field</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990432#M81908</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121051"&gt;@QFabian&lt;/a&gt;&amp;nbsp;You can get the month number with&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Month&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN class="s1"&gt;left&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;Fecha&lt;/SPAN&gt;, 3), 'MMM'))&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;I don't think there is any need to create a mapping table.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 14:14:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-ascii-text-to-date-field/m-p/1990432#M81908</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-10-08T14:14:04Z</dc:date>
    </item>
  </channel>
</rss>

