<?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: [resolved] extract year from date type variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272711#M49913</link>
    <description>Hello Shong,
&lt;BR /&gt;I have a similar doubt. i can do easily in SSIS. Confused to do the same thing in TOS as it involved JAVA.
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;i need to replicate 3 zero's (000) and add 2nd column which will be 004, same for 3rd column..003
&lt;BR /&gt;finally it should look like 1st + 2nd +3rd column : 20140203004003
&lt;BR /&gt;waiting for your early reply
&lt;BR /&gt;Thanks----&amp;gt;D</description>
    <pubDate>Thu, 05 Feb 2015 12:58:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-05T12:58:22Z</dc:date>
    <item>
      <title>[resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272708#M49910</link>
      <description>Hello All, 
&lt;BR /&gt;I need to convert Start_Date Column which is date datatype ex: "2012-12-26" to Start_Date_Key as 20121226 INT Datatype. 
&lt;BR /&gt;I can easily do it in SSIS with the expression&amp;nbsp;(YEAR((DT_DBDATE)START_DATE) * 10000) + (MONTH((DT_DBDATE)START_DATE) * 100) +DAY((DT_DBDATE)START_DATE). 
&lt;BR /&gt;How to achieve the above solution in TOS. I tried and no result came. 
&lt;BR /&gt;Please help. 
&lt;BR /&gt;Thanks&amp;nbsp;---&amp;gt; D</description>
      <pubDate>Wed, 04 Feb 2015 12:48:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272708#M49910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-04T12:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272709#M49911</link>
      <description>Hi&amp;nbsp; 
&lt;BR /&gt;In Talend, you can convert the data with date type to an int data with this expression: 
&lt;BR /&gt;source input--main(row1)--tMap--tLogRow 
&lt;BR /&gt; 
&lt;PRE&gt;TalendDate.getPartOfDate("YEAR",row1.YouDateColumnName)*10000+(TalendDate.getPartOfDate("MONTH",row1.YouDateColumnName)+1)*100+TalendDate.getPartOfDate("DAY_OF_MONTH",row1.YouDateColumnName) &lt;/PRE&gt; 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 05 Feb 2015 04:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272709#M49911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T04:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272710#M49912</link>
      <description>Hello Shong,
&lt;BR /&gt;I really appreciate your answer.
&lt;BR /&gt;i worked with the same code yesterday and executed the "Test" button in tmap Component to check for the result, but it is showing error!!cannot be resolved. Given default value to my date column.
&lt;BR /&gt;When i run my job, expected values are dumped to my DB Table. &amp;nbsp;thats cooool.
&lt;BR /&gt;i request you to suggest on how to post a new topic in talend forum instead of reply to post which exists already.
&lt;BR /&gt;Thanks----&amp;gt;D</description>
      <pubDate>Thu, 05 Feb 2015 12:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272710#M49912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T12:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272711#M49913</link>
      <description>Hello Shong,
&lt;BR /&gt;I have a similar doubt. i can do easily in SSIS. Confused to do the same thing in TOS as it involved JAVA.
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;i need to replicate 3 zero's (000) and add 2nd column which will be 004, same for 3rd column..003
&lt;BR /&gt;finally it should look like 1st + 2nd +3rd column : 20140203004003
&lt;BR /&gt;waiting for your early reply
&lt;BR /&gt;Thanks----&amp;gt;D</description>
      <pubDate>Thu, 05 Feb 2015 12:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272711#M49913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T12:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272712#M49914</link>
      <description>Hi&amp;nbsp; 
&lt;BR /&gt;I don't understand your last requirement, do you just want to append "003" to the int data? For example: 
&lt;BR /&gt;"yourLastIntData"+"003" 
&lt;BR /&gt;Can you please explain it with more details? 
&lt;BR /&gt;BR 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 05 Feb 2015 13:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272712#M49914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-05T13:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272713#M49915</link>
      <description>Hello,&lt;BR /&gt;Actually not able to add screenshot.&lt;BR /&gt;here are my three columns and their values.&lt;BR /&gt;Start_Date(Long) | Unit(integer)&amp;nbsp;| Source(integer)&lt;BR /&gt;20140203| 4| 3&lt;BR /&gt;Outcome should be concatenating all 3 columns and for 2nd and 3rd we need to supply it as 3 digits like "004" and "003"&lt;BR /&gt;Finally it should be "KEY"(long)=20140203004003&lt;BR /&gt;Thanks---&amp;gt;D</description>
      <pubDate>Fri, 06 Feb 2015 05:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272713#M49915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-06T05:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272714#M49916</link>
      <description>&lt;FONT color="#000000"&gt;&lt;FONT size="2"&gt;&lt;FONT face="??"&gt;Try this expression:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;PRE&gt;Long.parseLong(""+row1.c1+String.format("%03d",row1.c2)+String.format("%03d",row1.c3)&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Feb 2015 09:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272714#M49916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-08T09:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272715#M49917</link>
      <description>That's perfecto shong...</description>
      <pubDate>Mon, 09 Feb 2015 12:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272715#M49917</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T12:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272716#M49918</link>
      <description>Hi Shong.
&lt;BR /&gt;I have a string like "03-12-2012" in "MM-dd-yyyy" format.
&lt;BR /&gt;i need to get result as "20120312" which is ""yyyyMMdd" format.
&lt;BR /&gt;i tried with right and left string functions to get "yyyyMM" and stuck in getting "dd".
&lt;BR /&gt;Do i need to create routine for that? or is there any built in function equivalent to SubString() in TOS?
&lt;BR /&gt;Thanks---&amp;gt;D</description>
      <pubDate>Mon, 09 Feb 2015 12:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272716#M49918</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T12:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272717#M49919</link>
      <description>&lt;PRE&gt;new SimpleDateFormat("yyyyMMdd").format(newSimpleDateFormat("MM-dd-yyyy").parse(row1.date))&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Feb 2015 13:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272717#M49919</guid>
      <dc:creator>Steven_Crawford</dc:creator>
      <dc:date>2015-02-09T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272718#M49920</link>
      <description>Hi Steve, 
&lt;BR /&gt;Can you please be more specific? i am new comer to TOS. I don't know where i have to place the above expression whether in tmap or somewhere else? 
&lt;BR /&gt;Thanks---&amp;gt;D</description>
      <pubDate>Tue, 10 Feb 2015 04:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272718#M49920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-10T04:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] extract year from date type variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272719#M49921</link>
      <description>Hi Shong, 
&lt;BR /&gt;I have date column date datatype "03-02-2014" after doing transformation with the &amp;nbsp;expression&amp;nbsp;TalendDate.getPartOfDate("YEAR", row1.date )*10000 + TalendDate.getPartOfDate("MONTH",&amp;nbsp;row1.date&amp;nbsp;)*100+TalendDate.getPartOfDate("DAY_OF_WEEK",&amp;nbsp;row1.date&amp;nbsp;) 
&lt;BR /&gt;i am getting wrong output 20140201 which is not expected.&amp;nbsp; 
&lt;BR /&gt;expected one is 20140302. 
&lt;BR /&gt;can you please help? 
&lt;BR /&gt;Thanks----&amp;gt;D</description>
      <pubDate>Tue, 10 Feb 2015 05:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-extract-year-from-date-type-variable/m-p/2272719#M49921</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-10T05:42:02Z</dc:date>
    </item>
  </channel>
</rss>

