<?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 Extract Month and Year from file name separately in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Extract-Month-and-Year-from-file-name-separately/m-p/1826775#M15366</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file name like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abc-June-2021.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now i am trying to extract Month and year like this in script&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; Trim(Replace(FileBaseName(),'MMailBoxUsage-','')) as MailBox_Date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the output is &lt;STRONG&gt;June-2021&lt;/STRONG&gt; .. but now i want to extract Month and Year separately from &lt;STRONG&gt;MailBox_Date&lt;/STRONG&gt; field ..&amp;nbsp;&lt;/P&gt;&lt;P&gt;how i do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Aug 2021 18:44:03 GMT</pubDate>
    <dc:creator>capriconuser</dc:creator>
    <dc:date>2021-08-13T18:44:03Z</dc:date>
    <item>
      <title>Extract Month and Year from file name separately</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Extract-Month-and-Year-from-file-name-separately/m-p/1826775#M15366</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file name like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abc-June-2021.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now i am trying to extract Month and year like this in script&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; Trim(Replace(FileBaseName(),'MMailBoxUsage-','')) as MailBox_Date&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the output is &lt;STRONG&gt;June-2021&lt;/STRONG&gt; .. but now i want to extract Month and Year separately from &lt;STRONG&gt;MailBox_Date&lt;/STRONG&gt; field ..&amp;nbsp;&lt;/P&gt;&lt;P&gt;how i do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 18:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Extract-Month-and-Year-from-file-name-separately/m-p/1826775#M15366</guid>
      <dc:creator>capriconuser</dc:creator>
      <dc:date>2021-08-13T18:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Month and Year from file name separately</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Extract-Month-and-Year-from-file-name-separately/m-p/1826802#M15368</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41596"&gt;@capriconuser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you have :&lt;/P&gt;&lt;P&gt;Set LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';&lt;/P&gt;&lt;P&gt;you can use Month(Date#(MailBox_Date,'MMMM-YYYY') for the month and ,Year(Date#(MailBox_Date,'MMMM-YYYY')) for the year&lt;/P&gt;&lt;P&gt;for example :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Input:

LOAD *,Year(Date#(MailBox_Date,'MMMM-YYYY')) as Year_MailBox_Date,Month(Date#(MailBox_Date,'MMMM-YYYY')) as Month_MailBox_Date INLINE [
MailBox_Date
June-2021
];&lt;/LI-CODE&gt;&lt;P&gt;the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Taoufiq_Zarra_0-1628151282459.png"&gt;&lt;img src="https://community.qlik.com/skins/images/2866EA3F95B8B6AB12692AACED00302F/responsive_peak/images/image_not_found.png" alt="Taoufiq_Zarra_0-1628151282459.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 08:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Extract-Month-and-Year-from-file-name-separately/m-p/1826802#M15368</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-08-05T08:14:50Z</dc:date>
    </item>
  </channel>
</rss>

