<?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: Substring in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164538#M9040</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp; offers a fine solution&lt;/P&gt;
&lt;P&gt;The 'official' solution, perhaps faster and more readable is to use&amp;nbsp; STRFTIME (&amp;nbsp;&lt;A href="https://www.sqlite.org/lang_datefunc.html" target="_blank" rel="noopener"&gt;https://www.sqlite.org/lang_datefunc.html&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;
&lt;P&gt;Just use this as a edit/parse/test&amp;nbsp; to get going:&amp;nbsp; &amp;nbsp;strftime('%Y%m', 'now')&lt;/P&gt;
&lt;P&gt;btw... I can't help to make a pedantic / amuzed observation. I mean no harm, but check out the subject: "substring" 1) how it that going to help future reader with a similar challenge to find a solution. 2) a&amp;nbsp; solution is being implied/suggested. A subject line like "transformation to get year and month (substring) from date desired.".&amp;nbsp; &amp;nbsp; Grins, Hein.&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2024 18:52:50 GMT</pubDate>
    <dc:creator>Heinvandenheuvel</dc:creator>
    <dc:date>2024-01-23T18:52:50Z</dc:date>
    <item>
      <title>Substring</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164258#M9026</link>
      <description>&lt;P&gt;I have added CDCT column through global rules by adding "$AR_H_COMMIT_TIMESTAMP" command. And I have to use the CDCT column to fetch only year and month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;CDCT :&amp;nbsp; 2024-01-17T12:55:42.809+0000&lt;/P&gt;
&lt;P&gt;Output I expect : 202401&lt;/P&gt;
&lt;P&gt;What functions I need to use in Global Rules and how?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 09:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164258#M9026</guid>
      <dc:creator>chandraprakash_j_volvo</dc:creator>
      <dc:date>2024-01-23T09:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Substring</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164280#M9028</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/253662"&gt;@chandraprakash_j_volvo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to Qlik Community!&lt;/P&gt;
&lt;P&gt;There are different expressions can get such value, one of the easy-understanding expression is using substr function, the expression like:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;substr(date($AR_H_COMMIT_TIMESTAMP),1,4)||substr(date($AR_H_COMMIT_TIMESTAMP),6,2)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1706004042417.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127618i9A1DE69B8DF893FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1706004042417.png" alt="john_wang_0-1706004042417.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The output looks like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_1-1706004092452.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127619i382F5622A9466A5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_1-1706004092452.png" alt="john_wang_1-1706004092452.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 10:01:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164280#M9028</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-01-23T10:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Substring</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164538#M9040</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp; offers a fine solution&lt;/P&gt;
&lt;P&gt;The 'official' solution, perhaps faster and more readable is to use&amp;nbsp; STRFTIME (&amp;nbsp;&lt;A href="https://www.sqlite.org/lang_datefunc.html" target="_blank" rel="noopener"&gt;https://www.sqlite.org/lang_datefunc.html&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;
&lt;P&gt;Just use this as a edit/parse/test&amp;nbsp; to get going:&amp;nbsp; &amp;nbsp;strftime('%Y%m', 'now')&lt;/P&gt;
&lt;P&gt;btw... I can't help to make a pedantic / amuzed observation. I mean no harm, but check out the subject: "substring" 1) how it that going to help future reader with a similar challenge to find a solution. 2) a&amp;nbsp; solution is being implied/suggested. A subject line like "transformation to get year and month (substring) from date desired.".&amp;nbsp; &amp;nbsp; Grins, Hein.&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 18:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2164538#M9040</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-01-23T18:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Substring</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2175593#M9053</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Glad to get your input here! Yes I'm sure the latter expression performance is better than mine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/253662"&gt;@chandraprakash_j_volvo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;As explained there are many different expression, the better one from Hein is:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;strftime('%Y%m', $AR_H_COMMIT_TIMESTAMP)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1706101855043.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138326iE7843C4C01C24E3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1706101855043.png" alt="john_wang_0-1706101855043.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 13:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Substring/m-p/2175593#M9053</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-01-24T13:12:05Z</dc:date>
    </item>
  </channel>
</rss>

