<?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 Fetching tomorrow date's data (addDate function) from DB in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Fetching-tomorrow-date-s-data-addDate-function-from-DB/m-p/2247381#M32582</link>
    <description>Dear guys , 
&lt;BR /&gt;I have three tables with relations. table1 , table2 and table3 
&lt;BR /&gt; 
&lt;B&gt;Table1 fields :&lt;/B&gt; 
&lt;BR /&gt;t1_userid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( Foreign key of t3_userid ) 
&lt;BR /&gt;t1_appid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( Foreign key of t2_appid ) 
&lt;BR /&gt;t1_date 
&lt;BR /&gt; 
&lt;B&gt;Table2 fields:&lt;/B&gt; 
&lt;BR /&gt;t2_appid (Primary Key) 
&lt;BR /&gt;t2_appname 
&lt;BR /&gt; 
&lt;B&gt;Table3 fields:&lt;/B&gt; 
&lt;BR /&gt;t3_userid (Primary Key) 
&lt;BR /&gt;t3_username 
&lt;BR /&gt;Now i want to fetch tomorrow date (t1_date) data's 
&lt;BR /&gt;So i designed job like this 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCeO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154494iBD8BBEBEF0498A0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCeO.png" alt="0683p000009MCeO.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCeT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142346i017471BF1A98C875/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCeT.png" alt="0683p000009MCeT.png" /&gt;&lt;/span&gt; 
&lt;B&gt;&lt;FONT size="3"&gt;tjava component (add_date)&lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;String d=TalendDate.getDate("YYYY-MM-DD");&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;String ad=TalendDate.addDate(d,"yyyy-MM-dd",+1,"dd");&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;Tomorrow's date i will get from tjava component (add_date)&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;B&gt;&lt;FONT size="3"&gt;I want to construct a output with t1_appname , t3.username and t1_date (tomorrow's date) fields&lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;B&gt;&lt;FONT size="3"&gt;Help me to do this &lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;Thanks &amp;amp; Regards,&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;Vinoth Kumar K&lt;/FONT&gt;</description>
    <pubDate>Wed, 09 Dec 2015 04:37:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-12-09T04:37:45Z</dc:date>
    <item>
      <title>Fetching tomorrow date's data (addDate function) from DB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fetching-tomorrow-date-s-data-addDate-function-from-DB/m-p/2247381#M32582</link>
      <description>Dear guys , 
&lt;BR /&gt;I have three tables with relations. table1 , table2 and table3 
&lt;BR /&gt; 
&lt;B&gt;Table1 fields :&lt;/B&gt; 
&lt;BR /&gt;t1_userid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( Foreign key of t3_userid ) 
&lt;BR /&gt;t1_appid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( Foreign key of t2_appid ) 
&lt;BR /&gt;t1_date 
&lt;BR /&gt; 
&lt;B&gt;Table2 fields:&lt;/B&gt; 
&lt;BR /&gt;t2_appid (Primary Key) 
&lt;BR /&gt;t2_appname 
&lt;BR /&gt; 
&lt;B&gt;Table3 fields:&lt;/B&gt; 
&lt;BR /&gt;t3_userid (Primary Key) 
&lt;BR /&gt;t3_username 
&lt;BR /&gt;Now i want to fetch tomorrow date (t1_date) data's 
&lt;BR /&gt;So i designed job like this 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCeO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154494iBD8BBEBEF0498A0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCeO.png" alt="0683p000009MCeO.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCeT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142346i017471BF1A98C875/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCeT.png" alt="0683p000009MCeT.png" /&gt;&lt;/span&gt; 
&lt;B&gt;&lt;FONT size="3"&gt;tjava component (add_date)&lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;String d=TalendDate.getDate("YYYY-MM-DD");&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;String ad=TalendDate.addDate(d,"yyyy-MM-dd",+1,"dd");&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;Tomorrow's date i will get from tjava component (add_date)&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;B&gt;&lt;FONT size="3"&gt;I want to construct a output with t1_appname , t3.username and t1_date (tomorrow's date) fields&lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;B&gt;&lt;FONT size="3"&gt;Help me to do this &lt;/FONT&gt;&lt;/B&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;Thanks &amp;amp; Regards,&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;Vinoth Kumar K&lt;/FONT&gt;</description>
      <pubDate>Wed, 09 Dec 2015 04:37:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fetching-tomorrow-date-s-data-addDate-function-from-DB/m-p/2247381#M32582</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-09T04:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching tomorrow date's data (addDate function) from DB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Fetching-tomorrow-date-s-data-addDate-function-from-DB/m-p/2247382#M32583</link>
      <description>Hi Vinoth,
&lt;BR /&gt;I would suggest you to make use of global map.&amp;nbsp;
&lt;BR /&gt;Get current date - &amp;gt; add a day -&amp;gt; put the new date in global map &amp;nbsp;and then get that value where ever you need it.
&lt;BR /&gt;
&lt;PRE&gt;Date date = TalendDate.getCurrentDate();&lt;BR /&gt;Date toDate = TalendDate.addDate(date, 1,"dd");&lt;BR /&gt;globalMap.put("toDate", toDate);&lt;BR /&gt;Or if you want date as string.&lt;BR /&gt;String date = TalendDate.getDate("yyyy-MM-dd");&lt;BR /&gt;String toDate = TalendDate.addDate(date, "yyyy-MM-dd", 1, "dd");&lt;BR /&gt;globalMap.put("toDate", toDate);&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;Now in the expression field for t1_date put this&amp;nbsp;
&lt;BR /&gt;
&lt;PRE&gt;globalMap.get("toDate")&lt;/PRE&gt;
&lt;BR /&gt;You can use date as it is if column type is Date, you can specify the date format there.</description>
      <pubDate>Sun, 13 Dec 2015 15:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Fetching-tomorrow-date-s-data-addDate-function-from-DB/m-p/2247382#M32583</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-13T15:50:44Z</dc:date>
    </item>
  </channel>
</rss>

