<?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 Create YYYYMM and Year field in script from a date field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817014#M1245912</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a field in my script called "Ordering_Date", the format of this column is set as a date (see attached image). I would like to create another field that essentially is a column that captures just the year and month, in the format "YYYMM" from the Ordering_Date field&amp;nbsp; as well as a column that captures just the year. Would this be a convert formula? What should I add to my script to load those two requested columns?&lt;BR /&gt;&lt;BR /&gt;Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Clem&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
    <dc:creator>clemmytang</dc:creator>
    <dc:date>2026-01-26T18:19:17Z</dc:date>
    <item>
      <title>Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817014#M1245912</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a field in my script called "Ordering_Date", the format of this column is set as a date (see attached image). I would like to create another field that essentially is a column that captures just the year and month, in the format "YYYMM" from the Ordering_Date field&amp;nbsp; as well as a column that captures just the year. Would this be a convert formula? What should I add to my script to load those two requested columns?&lt;BR /&gt;&lt;BR /&gt;Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Clem&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817014#M1245912</guid>
      <dc:creator>clemmytang</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817021#M1245914</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Date(MonthStart(Ordering_Date), 'YYYMM') AS Ordering_Month,
Year(Ordering_Date) AS Ordering_Year&lt;/LI-CODE&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 14:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817021#M1245914</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-22T14:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817031#M1245915</link>
      <description>&lt;P&gt;Thanks for your reply. I added your suggestion to my script:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clemmytang_0-1624373303303.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57351i84F00E1906DB5D9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clemmytang_0-1624373303303.png" alt="clemmytang_0-1624373303303.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Didn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I got the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clemmytang_1-1624373433101.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57352iBD23290EB9CEAD59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clemmytang_1-1624373433101.png" alt="clemmytang_1-1624373433101.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 14:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817031#M1245915</guid>
      <dc:creator>clemmytang</dc:creator>
      <dc:date>2021-06-22T14:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817032#M1245916</link>
      <description>&lt;P&gt;You must use the source field: PROC.ORDERING_DATE&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 14:53:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817032#M1245916</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-22T14:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817037#M1245917</link>
      <description>&lt;P&gt;Hi&amp;nbsp; JG,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried that as well and it still did not work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 15:04:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817037#M1245917</guid>
      <dc:creator>clemmytang</dc:creator>
      <dc:date>2021-06-22T15:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817215#M1245918</link>
      <description>&lt;P&gt;OK, I see the problem. You have two sections, the SQL part that runs the query against your Oracle database, and the LOAD part that tells Qlik what to do with those query results. This sentences must be included in the LOAD part as they are Qlik functions, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD
   *,
   Date(MonthStart(ORDERING_DATE), 'YYYMM') AS Ordering_Month,
   Year(ORDERING_DATE) AS Ordering_Year
;
SELECT ....
FROM ...
;&lt;/LI-CODE&gt;&lt;P&gt;And don't forget to remove those lines from the SQL sentence, as Oracle doesn't understand the Qlik functions.&lt;/P&gt;&lt;P&gt;JG&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 06:59:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817215#M1245918</guid>
      <dc:creator>JuanGerardo</dc:creator>
      <dc:date>2021-06-23T06:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create YYYYMM and Year field in script from a date field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817469#M1245919</link>
      <description>&lt;P&gt;JG, you are a genius &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Your suggestion worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!!&lt;/P&gt;&lt;P&gt;Clem&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 19:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-YYYYMM-and-Year-field-in-script-from-a-date-field/m-p/1817469#M1245919</guid>
      <dc:creator>clemmytang</dc:creator>
      <dc:date>2021-06-23T19:41:24Z</dc:date>
    </item>
  </channel>
</rss>

