<?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 how to parse date format without leading zeros? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832979#M68759</link>
    <description>&lt;P&gt;I am loading data from an SSIS task monitor database where the datetime fields come through in this format:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Sep 1 2021 9:35AM
Aug 31 2021 9:00PM&lt;/LI-CODE&gt;&lt;P&gt;When I attempt to use Date# or Timestamp# to interpret that, I find that&amp;nbsp;&lt;/P&gt;&lt;P&gt;'MMM DD YYYY hh:mmtt'&lt;/P&gt;&lt;P&gt;does not work and I must resort to something like this...plus some if statements to test whether it's a single or multiple digit for the month or hour&lt;/P&gt;&lt;P&gt;=Timestamp(Timestamp#(LastRun,'MMM D YYYY h:mmTT'))&lt;/P&gt;&lt;P&gt;Is there a better way???&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 15:32:11 GMT</pubDate>
    <dc:creator>daveatkins</dc:creator>
    <dc:date>2021-09-01T15:32:11Z</dc:date>
    <item>
      <title>how to parse date format without leading zeros?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832979#M68759</link>
      <description>&lt;P&gt;I am loading data from an SSIS task monitor database where the datetime fields come through in this format:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Sep 1 2021 9:35AM
Aug 31 2021 9:00PM&lt;/LI-CODE&gt;&lt;P&gt;When I attempt to use Date# or Timestamp# to interpret that, I find that&amp;nbsp;&lt;/P&gt;&lt;P&gt;'MMM DD YYYY hh:mmtt'&lt;/P&gt;&lt;P&gt;does not work and I must resort to something like this...plus some if statements to test whether it's a single or multiple digit for the month or hour&lt;/P&gt;&lt;P&gt;=Timestamp(Timestamp#(LastRun,'MMM D YYYY h:mmTT'))&lt;/P&gt;&lt;P&gt;Is there a better way???&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832979#M68759</guid>
      <dc:creator>daveatkins</dc:creator>
      <dc:date>2021-09-01T15:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to parse date format without leading zeros?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832985#M68762</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/47012"&gt;@daveatkins&lt;/a&gt;&amp;nbsp; if you use below, it works for both single and double digit day and hour values&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;LOAD * , timestamp#(Date,'MMM DD YYYY hh:mmTT') as Date2 Inline [
Date
Sep 1 2021 9:35AM
Aug 31 2021 9:00PM
Aug 12 2021 10:00AM
Aug 3 2021 10:30AM
Aug 22 2021 6:30AM  ];&lt;/LI-CODE&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="Kushal_Chawda_0-1630511108369.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/61151i80CEE6AAAF2A8845/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kushal_Chawda_0-1630511108369.png" alt="Kushal_Chawda_0-1630511108369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:45:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832985#M68762</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-09-01T15:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to parse date format without leading zeros?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832987#M68763</link>
      <description>&lt;P&gt;your example does not match my data; the issue is that my numbers are formatted with leading spaces. I was able to use this code to make it work:&lt;/P&gt;&lt;P&gt;=Timestamp(Timestamp#(&lt;BR /&gt;left(LastRun,4) &amp;amp; trim(mid(LastRun,5,2)) &amp;amp; mid(LastRun,7,6) &amp;amp; trim(right(LastRun,7))&lt;BR /&gt;,'MMM D YYYY hh:mmTT'))&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1832987#M68763</guid>
      <dc:creator>daveatkins</dc:creator>
      <dc:date>2021-09-01T15:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to parse date format without leading zeros?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1833003#M68767</link>
      <description>&lt;P&gt;Try somethin like this,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Timestamp(Alt(Timestamp#(LastRun,'MMM D YYYY h:mmTT'),
Timestamp#(LastRun,'MMM DD YYYY h:mmTT'))
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Sep 2021 17:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1833003#M68767</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-09-01T17:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to parse date format without leading zeros?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1833068#M68771</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/47012"&gt;@daveatkins&lt;/a&gt;&amp;nbsp; try below. If &lt;STRONG&gt;chr(32)&lt;/STRONG&gt; does not work then try &lt;STRONG&gt;chr(160)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;map_spaces:
Mapping LOAD Repeat(chr(32),RowNo()) as Row,
             ' ' as Map_space
AutoGenerate 5;

LOAD * , timestamp(timestamp#(trim(MapSubString('map_spaces',Date)),'MMM DD YYYY hh:mmTT')) as Date_formatted Inline [
Date
Sep  1 2021 9:35AM
Aug 31 2021 9:00PM
Aug 12 2021 10:00AM
Aug  3 2021 10:30AM
Aug 22 2021  6:30AM  ];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 00:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-parse-date-format-without-leading-zeros/m-p/1833068#M68771</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2021-09-02T00:30:09Z</dc:date>
    </item>
  </channel>
</rss>

