<?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: Derive first day based on month and year in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236698#M25350</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the help!&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;PV&lt;/P&gt;</description>
    <pubDate>Mon, 04 Nov 2019 14:29:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-04T14:29:36Z</dc:date>
    <item>
      <title>Derive first day based on month and year</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236696#M25348</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I have a table in which I have data for month and year.&lt;/P&gt;
&lt;P&gt;Table:Fact_1:&lt;/P&gt;
&lt;P&gt;Month&amp;nbsp; &amp;nbsp;Year&amp;nbsp; &amp;nbsp;Turnover&lt;/P&gt;
&lt;P&gt;10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019&amp;nbsp; &amp;nbsp; &amp;nbsp;500&lt;/P&gt;
&lt;P&gt;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019&amp;nbsp; &amp;nbsp; &amp;nbsp;1000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now based on the month and year, I want to have first day of the month to be caculated with date type.&lt;/P&gt;
&lt;P&gt;Month&amp;nbsp; &amp;nbsp;Year&amp;nbsp; &amp;nbsp; Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Turnover&lt;/P&gt;
&lt;P&gt;10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019&amp;nbsp; &amp;nbsp; 2019-10-01 00:00:00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 500&lt;/P&gt;
&lt;P&gt;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019&amp;nbsp; &amp;nbsp;&amp;nbsp;2019-11-01 00:00:00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I calculate this date in tmap?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;PV&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 13:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236696#M25348</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T13:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Derive first day based on month and year</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236697#M25349</link>
      <description>&lt;P&gt;I'm not sure if you are asking for the first day (as in 01) or the first day name? I'll show both. The first day name can be calculated as below. I'll assume your data row is "row1" and I'll use your column names....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;routines.TalendDate.formatDate("EEEE",routines.TalendDate.parseDate("yyyy-MM-dd", row1.Year+"-"+row1.Month+"-01")));&lt;/PRE&gt; 
&lt;P&gt;If you want just the date as a numerical String, you don't need to do anything special. Just the below....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;row1.Year+"-"+row1.Month+"-01 00:00:00"&lt;/PRE&gt; 
&lt;P&gt;If you want to convert it to an actual Date object, do the following....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;routines.TalendDate.parseDate("yyyy-MM-dd", row1.Year+"-"+row1.Month+"-01")&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 13:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236697#M25349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T13:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Derive first day based on month and year</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236698#M25350</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the help!&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;PV&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 14:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Derive-first-day-based-on-month-and-year/m-p/2236698#M25350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T14:29:36Z</dc:date>
    </item>
  </channel>
</rss>

