<?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: getCurrentYear in a tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352919#M119207</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;TalendDate.parseDate("dd/MM/YYYY",Var.VAR1 +"/"+ TalendDate.formatDate("YYYY",TalendDate.getCurrentDate()&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;Send me Love and Kudos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 09:02:32 GMT</pubDate>
    <dc:creator>gjeremy1617088143</dc:creator>
    <dc:date>2021-07-06T09:02:32Z</dc:date>
    <item>
      <title>getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352918#M119206</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a tMap with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;"01/"+row1.month   &lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as VAR1 in the middle, and then is passed to the output &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;TalendDate.parseDate("dd/MM", Var.VAR1 )&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have days and months but I need THE CURRENT YEAR. ¿ What would be the best option?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:58:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352918#M119206</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2024-11-15T23:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352919#M119207</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;TalendDate.parseDate("dd/MM/YYYY",Var.VAR1 +"/"+ TalendDate.formatDate("YYYY",TalendDate.getCurrentDate()&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;Send me Love and Kudos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 09:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352919#M119207</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-06T09:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352920#M119208</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this code and Idk why Im having another month:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column month are the months of my table, column Date is your code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gg7EmAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135055i71D37CA9D4CF0AF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gg7EmAAJ.png" alt="0695b00000Gg7EmAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 09:20:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352920#M119208</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-07-06T09:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352921#M119209</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; I saw month is only on one character :&lt;/P&gt;&lt;P&gt;so in var1 you can replace row1.month by : String.format("%02d",Integer.valueOf(row1.month))&lt;/P&gt;&lt;P&gt;it will add a zero on the left if month is only on one character.&lt;/P&gt;&lt;P&gt;Send Me love and Kudos&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 09:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352921#M119209</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-06T09:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352922#M119210</link>
      <description>&lt;P&gt;Hi again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I fixed the day and month variable as "01/"+ String.format("%02d",Integer.valueOf(row1.month))&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in the output I put your code as in the first response.&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;&lt;P&gt;BUT I still have the same problem, the mont is other, so strange...&lt;/P&gt;&lt;P&gt;The first column is only the day and month (with the zero)&lt;/P&gt;&lt;P&gt;The second column is your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gg7Q9AAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133575i7EEB079B671DB318/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gg7Q9AAJ.png" alt="0695b00000Gg7Q9AAJ.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 09:54:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352922#M119210</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-07-06T09:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352923#M119211</link>
      <description>&lt;P&gt;Could you send the date pattern of the date output schema ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;I think you have to set the date pattern in your output schema as :&lt;/P&gt;&lt;P&gt;"dd/MM/YYYY"&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 09:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352923#M119211</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-06T09:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352924#M119212</link>
      <description>&lt;P&gt;This is the pattern in the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gg7UzAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143365i1501F1C156EA496B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gg7UzAAJ.png" alt="0695b00000Gg7UzAAJ.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a var2 with only the year&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gg7VJAAZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139460i47E589FAE8CC2B15/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gg7VJAAZ.png" alt="0695b00000Gg7VJAAZ.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then in the output I have var1 + var2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gg7VTAAZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145305i3E4609027EA9E5EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gg7VTAAZ.png" alt="0695b00000Gg7VTAAZ.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in the DDBB I still have the data with another month and the format isn't the correct despite being put the format with "/" and year at final&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Gg7VdAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150129iAC118C8948B0C5BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Gg7VdAAJ.png" alt="0695b00000Gg7VdAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 10:12:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352924#M119212</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-07-06T10:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352925#M119213</link>
      <description>&lt;P&gt;Hi, if ou put a tlogrow after the tmap , wich value do you have?&lt;/P&gt;&lt;P&gt;You try to send it in a database ,if yes in wich database (sql server ,postgre, mysql...)?&lt;/P&gt;&lt;P&gt;the pattern seems to be :&lt;/P&gt;&lt;P&gt;"YYYY-MM-DD hh:mm:ss.SSS"&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:01:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352925#M119213</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-06T12:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352926#M119214</link>
      <description>&lt;P&gt;so maybe try :&lt;/P&gt;&lt;P&gt;Var.VAR1 = String.format("%02d",Integer.valueOf(row1.month)) +"-01"&lt;/P&gt;&lt;P&gt;output : Var.VAR2 + "-"+Var.VAR1&lt;/P&gt;&lt;P&gt;pattern of output : "YYYY-MM-DD"&lt;/P&gt;&lt;P&gt;and maybe on your database server don't have the same utc date, it can cause different date if you have some hour of shift.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352926#M119214</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-06T12:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352927#M119215</link>
      <description>&lt;P&gt;Yes, im trying to send this to a DDBB,  SQL SERVER. I put the pattern as "dd/MM/YYYY" but still in YYYY-MM-DD&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:11:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352927#M119215</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-07-06T12:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352928#M119216</link>
      <description>&lt;P&gt;This code: Var.VAR1 = String.format("%02d",Integer.valueOf(row1.month)) +"-01"&lt;/P&gt;&lt;P&gt;output : Var.VAR2 + "-"+Var.VAR1&lt;/P&gt;&lt;P&gt;pattern of output : "YYYY-MM-DD"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is in string, right? &lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352928#M119216</guid>
      <dc:creator>EvoticTalend</dc:creator>
      <dc:date>2021-07-06T12:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: getCurrentYear in a tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352929#M119217</link>
      <description>&lt;P&gt;sorry you have to parse it as a date :&lt;/P&gt;&lt;P&gt;TalendDate.parseDate("YYY-MM-DD",Var.VAR2 + "-"+Var.VAR1)&lt;/P&gt;&lt;P&gt;pattern of output date schema : "YYYY-MM-DD"&lt;/P&gt;&lt;P&gt;here a link to the sql server doc for date pattern:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/functions/date-and-time-data-types-and-functions-transact-sql?view=sql-server-ver15" alt="https://docs.microsoft.com/en-us/sql/t-sql/functions/date-and-time-data-types-and-functions-transact-sql?view=sql-server-ver15" target="_blank"&gt;https://docs.microsoft.com/en-us/sql/t-sql/functions/date-and-time-data-types-and-functions-transact-sql?view=sql-server-ver15&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/getCurrentYear-in-a-tMap/m-p/2352929#M119217</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-06T12:15:28Z</dc:date>
    </item>
  </channel>
</rss>

