<?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: Assemble a Date Picking Up Parts of a Text in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548871#M39537</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worked perfectly. Thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2019 18:41:02 GMT</pubDate>
    <dc:creator>edugallowk</dc:creator>
    <dc:date>2019-02-25T18:41:02Z</dc:date>
    <item>
      <title>Assemble a Date Picking Up Parts of a Text</title>
      <link>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1547039#M39379</link>
      <description>&lt;P&gt;Hello! Can someone give me a hint?&lt;/P&gt;&lt;P&gt;In the TXT file that I receive, there is text in the third line. Example: "Prize - 02/2019" and need to assemble three date fields with this information.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot_1.png" style="width: 642px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6436iBEF8C3ACD8A4C21F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;1 - Initial date&amp;gt; Expected result 05/01/2019&lt;BR /&gt;2 - Final date&amp;gt; Expected result 04/02/2019&lt;BR /&gt;3 - Payment date&amp;gt; Expected result 05/02/2019&lt;/P&gt;&lt;P&gt;The payment date was set as follows:&lt;/P&gt;&lt;PRE&gt;Preload:&lt;BR /&gt;LOAD Distinct&lt;BR /&gt;   // Payment Date&lt;BR /&gt;   '05'&amp;amp;'/'&amp;amp;SubField(@1,'-',-1) as FAT_Vencimento,
FROM [lib://FTP_CF_SEGUROS/DM_*.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq, header is 1 lines)
Where WildMatch(@1,'Prêmio*')
;&lt;/PRE&gt;&lt;P&gt;I do not know if this is correct but for date of payment, but it works. Already the other dates that I need I could not mount. It has to be dynamic, because every month the payment date will change.&lt;/P&gt;&lt;P&gt;When the file is Jan / 2019 the dates have to be these:&lt;BR /&gt;1 - Initial date&amp;gt; Expected result 05/12/2018&lt;BR /&gt;2 - Final date&amp;gt; Expected result 04/01/2019&lt;BR /&gt;3 - Payment date&amp;gt; Expected result 05/01/2019&lt;/P&gt;&lt;P&gt;When the file is fev / 2019 the dates have to be these:&lt;BR /&gt;1 - Initial date&amp;gt; Expected result 05/01/2019&lt;BR /&gt;2 - Final date&amp;gt; Expected result 04/02/2019&lt;BR /&gt;3 - Payment date&amp;gt; Expected result 05/02/2019&lt;/P&gt;&lt;P&gt;When the file is Mar / 2019 the dates have to be these:&lt;BR /&gt;1 - Initial date&amp;gt; Expected result 05/02/2019&lt;BR /&gt;2 - Final date&amp;gt; Expected result 03/03/2019&lt;BR /&gt;3 - Payment date&amp;gt; Expected result 05/03/2019&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 759px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6437i3A15D963364E3CF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your attention and help.&lt;/P&gt;&lt;P&gt;Hugs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:32:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1547039#M39379</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2024-11-16T06:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assemble a Date Picking Up Parts of a Text</title>
      <link>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1547074#M39388</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;PRE&gt;Preload:
LOAD Distinct
   '05'&amp;amp;'/'&amp;amp;SubField(@1,'-',-1) as FAT_Vencimento,
   &lt;FONT color="#FF0000"&gt;Date(Date#('05'&amp;amp;'/'&amp;amp;SubField('Prêmio - 02/2019',' - ',-1), 'DD/MM/YYYY')-1, 'DD/MM/YYYY') as FAT_Final_Date,
   Date(AddMonths(Date#('05'&amp;amp;'/'&amp;amp;SubField('Prêmio - 01/2019',' - ',-1), 'DD/MM/YYYY'), -1), 'DD/MM/YYYY') as FAT_Initial_Date&lt;/FONT&gt;
FROM [lib://FTP_CF_SEGUROS/DM_*.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq, header is 1 lines)
Where WildMatch(@1,'Prêmio*')
;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 19:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1547074#M39388</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-20T19:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Assemble a Date Picking Up Parts of a Text</title>
      <link>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548137#M39455</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I tested the tip and I need to improve the result.&lt;BR /&gt;As it stands, the date is fixed in the code, but it must be dynamic, according to what it finds in the file.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;In the file that come 'Premium - 02/2019', I need to mount the payment date 05/02/2019, start date 05/01/2019 and end date 04/02/2019. In what comes 'Prize - 03/2019', I will need to set the payment date 05/03/2019, start date 05/02/2019 and end date 04/03/2019.&lt;/P&gt;&lt;P&gt;As I used the script:&lt;/P&gt;&lt;PRE&gt;'05' &amp;amp; '/' &amp;amp; SubField (@ 1, '-', - 1)  as &lt;/PRE&gt;&lt;P&gt;and managed to mount the payment date (I imagine), I tried to replace the excerpt from your example with this script, it does not understand whether it is a date, not a result.&lt;/P&gt;&lt;PRE&gt;Date(AddMonths(Date#('05'&amp;amp;'/'&amp;amp;SubField(@1,'-',-1), 'DD/MM/YYYY'), -1), 'DD/MM/YYYY') as FAT_Initial_Date,
    Date(Date#('05'&amp;amp;'/'&amp;amp;SubField(@1,'-',-1), 'DD/MM/YYYY')-1, 'DD/MM/YYYY') as FAT_Final_Date&lt;/PRE&gt;&lt;P&gt;I put an attachment to see if I can show better&lt;/P&gt;&lt;P&gt;Att&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 14:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548137#M39455</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2019-02-22T14:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Assemble a Date Picking Up Parts of a Text</title>
      <link>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548142#M39456</link>
      <description>&lt;P&gt;I think you needed to use ' - ' instead of '-' in your subfield function to make sure that the date comes out at 05/02/2019 instead of 05 /02/2019 (with a gap)&lt;/P&gt;&lt;PRE&gt;Preload:
LOAD Distinct
	 FileBaseName() as PK_FileBaseName,
     Date#('05/' &amp;amp;SubField(@1,&lt;FONT color="#FF0000"&gt;' - '&lt;/FONT&gt;,-1),'DD/MM/YYYY') as FAT_Vencimento,
   	 //Date(AddMonths(Date#('05'&amp;amp;'/'&amp;amp;SubField('Prêmio - 01/2019',&lt;FONT color="#FF0000"&gt;' - '&lt;/FONT&gt;,-1), 'DD/MM/YYYY'), -1), 'DD/MM/YYYY') as FAT_Initial_Date,
     Date(AddMonths(Date#('05'&amp;amp;'/'&amp;amp;SubField(@1,&lt;FONT color="#FF0000"&gt;' - '&lt;/FONT&gt;,-1), 'DD/MM/YYYY'), -1), 'DD/MM/YYYY') as FAT_Initial_Date,
     Date(Date#('05'&amp;amp;'/'&amp;amp;SubField(@1, &lt;FONT color="#FF0000"&gt;' - '&lt;/FONT&gt;,-1), 'DD/MM/YYYY')-1, 'DD/MM/YYYY') as FAT_Final_Date
FROM [DM_*.txt]
(txt, codepage is 28591, no labels, delimiter is ',', msq, header is 1 lines)
Where WildMatch(@1,'Prêmio*')
;&lt;/PRE&gt;&lt;P&gt;Tested it in QlikView, but should work the same way in Qlik Sense&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 14:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548142#M39456</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-22T14:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assemble a Date Picking Up Parts of a Text</title>
      <link>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548871#M39537</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worked perfectly. Thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 18:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Assemble-a-Date-Picking-Up-Parts-of-a-Text/m-p/1548871#M39537</guid>
      <dc:creator>edugallowk</dc:creator>
      <dc:date>2019-02-25T18:41:02Z</dc:date>
    </item>
  </channel>
</rss>

