<?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 join and compare dates with current time stamp on tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268284#M46906</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;I am trying to populate sales promotion information based on market, category and start and end time stamps.&lt;/P&gt; 
&lt;P&gt;Market and Category details are there on input and lookup files, I am doing left outer join on those using tmap.&lt;/P&gt; 
&lt;P&gt;I am facing issue with start and end time stamp. The sales promotion has to be updated as per the timestamp. This will not be there on input feed. If the current time stamp is between start and end timestamp, I want to update sales promotion data on feeds&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any idea on how to handle this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Mahesh&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-18_18-04-36.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3VF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137235i9056EAE69AB5CDD4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3VF.png" alt="0683p000009M3VF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2019 12:36:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-03-18T12:36:21Z</dc:date>
    <item>
      <title>join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268284#M46906</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;I am trying to populate sales promotion information based on market, category and start and end time stamps.&lt;/P&gt; 
&lt;P&gt;Market and Category details are there on input and lookup files, I am doing left outer join on those using tmap.&lt;/P&gt; 
&lt;P&gt;I am facing issue with start and end time stamp. The sales promotion has to be updated as per the timestamp. This will not be there on input feed. If the current time stamp is between start and end timestamp, I want to update sales promotion data on feeds&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any idea on how to handle this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Mahesh&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-18_18-04-36.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3VF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137235i9056EAE69AB5CDD4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3VF.png" alt="0683p000009M3VF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 12:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268284#M46906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-18T12:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268285#M46907</link>
      <description>&lt;P&gt;if you want out yo be generated only if current time between Start_time and end_time , you should use filter expression ( a small button with arrow mark)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;with expression like&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;TalendDate.compareDate(TalendDate.getCurrentDate(),row6.START_TIME) &amp;gt;= 0 &amp;amp;&amp;amp;&lt;/P&gt; 
&lt;P&gt;( row6.end_TIME == null ||&amp;nbsp; TalendDate.compareDate(TalendDate.getCurrentDate(),row6.end_TIME) &amp;lt; 0 )&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;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 14:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268285#M46907</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-18T14:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268286#M46908</link>
      <description>&lt;P&gt;Thanks for the details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried it, but i am getting &lt;STRONG&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problem:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;getCurrentDate is returning timestamp with time zone, therefore I added format of timestamp which I needed to match lookup field columns, START_DATE and END_DATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TalendDate.compareDate(TalendDate.getCurrentDate(),row6.START_DATE,"yyyy-MM-dd HH:mm:ss") &amp;gt; = 0&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TalendDate.compareDate(TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",TalendDate.getCurrentDate()),TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",row6.START_DATE)) &amp;gt; 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both of them giving type conversion error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-19_2-01-56.png" style="width: 999px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/17389i058240999A16F166/image-size/large?v=1.0&amp;amp;px=999" title="2019-03-19_2-01-56.png" alt="2019-03-19_2-01-56.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 20:37:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268286#M46908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-18T20:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268287#M46909</link>
      <description>Usually start_date and end_date is date so no parsing needed here.
&lt;BR /&gt;
&lt;BR /&gt;You can get correct timezone time , by adding/substracting hours.
&lt;BR /&gt;
&lt;BR /&gt;But make sure your job server is in same timezone of development server. Otherwise</description>
      <pubDate>Mon, 18 Mar 2019 22:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268287#M46909</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-18T22:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268288#M46910</link>
      <description>&lt;P&gt;In my case, start and end date has time with it, as sales promotion has to be running during that time period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can check the screenshot attached on my previous comment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue seems to be data format. The &lt;STRONG&gt;compareDate&lt;/STRONG&gt; functions expects both dates as arguments. In my case I have current date which I am parsing(TalendDate.parseDate) to convert it to date, also tried to parse start_date column to date, still seeing error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 11:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268288#M46910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-19T11:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268289#M46911</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TalendDate.getCurrentDate() is aleady a date. But it is always in Locale Timezone.&lt;/P&gt;
&lt;P&gt;To auto parse&amp;nbsp;2019-03-17 18:00:00 as Date , in schema definition use date pattern ""yyyy-MM-dd HH:mm:ss"" and type Date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the expression ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TalendDate.compareDate(TalendDate.getCurrentDate(),row1.newColumn) &amp;gt;= 0 &amp;amp;&amp;amp;&lt;BR /&gt;( row1.newColumn1 == null || TalendDate.compareDate(TalendDate.getCurrentDate(),row1.newColumn1) &amp;lt; 0 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it works e.g; in input I have&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2019-03-17 18:00:00;2019-03-19 18:00:00&lt;BR /&gt;2019-03-17 18:00:00;2019-03-18 18:00:00&lt;BR /&gt;2019-03-17 18:00:00;2019-03-17 19:00:00&lt;BR /&gt;2019-03-17 18:00:00;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current Time for me is&amp;nbsp;2019-03-19 10:54:40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with above expression , I get 1st record and last record in Output w/o any Parsing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2019-03-17 18:00:00|2019-03-19 18:00:00&lt;BR /&gt;2019-03-17 18:00:00|&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if it is working for you.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 11:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268289#M46911</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-19T11:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268290#M46912</link>
      <description>&lt;P&gt;Abhishek,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried the same solution by changing the column name as per my schema, getting error - Type mismatch cannot convert from boolean to date&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Attached screenshot of my workflow&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-19_17-58-23.png" style="width: 999px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/17426iB488F48B90D215D1/image-size/large?v=1.0&amp;amp;px=999" title="2019-03-19_17-58-23.png" alt="2019-03-19_17-58-23.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:30:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268290#M46912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-19T12:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268291#M46913</link>
      <description>&lt;P&gt;I guess , the variable you created is Date type , Above expression gives true or false.&lt;/P&gt; 
&lt;P&gt;Try like this&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TalendImage.JPG" style="width: 999px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/17428i00C3A97C0EB004D8/image-size/large?v=1.0&amp;amp;px=999" title="TalendImage.JPG" alt="TalendImage.JPG" /&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Do not worry about expression editor Test result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268291#M46913</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-19T12:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: join and compare dates with current time stamp on tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268292#M46914</link>
      <description>&lt;P&gt;Many Thanks Abhishek. It worked.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 20:08:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/join-and-compare-dates-with-current-time-stamp-on-tmap/m-p/2268292#M46914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-19T20:08:47Z</dc:date>
    </item>
  </channel>
</rss>

