<?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: Comparing dynamic date with a specific date in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289618#M62987</link>
    <description>&lt;P&gt;Your code worked fine for me with the data you provided.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Screenshot of my test job showing the fixed input with your test data:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test-date.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M52s.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136051i6ACC2FBACD3AE0C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M52s.png" alt="0683p000009M52s.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Contents of the tJavaRow component:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;int compare = TalendDate.compareDate(TalendDate.parseDate("MM/dd/yyyy",row1.ETA),TalendDate.parseDate("MM/dd/yyyy","5/1/2019"));
System.out.println(row1.ETA + ":" + compare);&lt;/PRE&gt; 
&lt;P&gt;Output:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Starting job TestDate at 23:55 03/05/2019.

[statistics] connecting to socket on port 3424
[statistics] connected
5/1/2019:0
3/24/2019:-1
12/13/2017:-1
[statistics] disconnected

Job TestDate ended at 23:55 03/05/2019. [exit code=0]&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You should check your data input to make sure it does not contain that unexpected date value that you showed.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am also attaching the zip archive of the test job.&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LvWE"&gt;TestDate.zip&lt;/A&gt;</description>
    <pubDate>Sat, 04 May 2019 05:01:10 GMT</pubDate>
    <dc:creator>nfz11</dc:creator>
    <dc:date>2019-05-04T05:01:10Z</dc:date>
    <item>
      <title>Comparing dynamic date with a specific date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289617#M62986</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise me below. Thanks&lt;/P&gt;
&lt;P&gt;I would like to deliver the report showing ETA&amp;gt;=5/1/2019. Currently ETA is a string data type and date in ETA column has empty value or date format like 5/1/2019, 3/24/2019, 12/13/2017.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying below syntax but I got Unparseable date error such as "2019-03-12" but I looked at my data and I did not find date like that format.&lt;/P&gt;
&lt;P&gt;TalendDate.compareDate(TalendDate.parseDate("MM/dd/yyyy",row1.ETA),TalendDate.parseDate("MM/dd/yyyy","5/1/2019"))&amp;gt;=0&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 16:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289617#M62986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-02T16:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dynamic date with a specific date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289618#M62987</link>
      <description>&lt;P&gt;Your code worked fine for me with the data you provided.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Screenshot of my test job showing the fixed input with your test data:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test-date.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M52s.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136051i6ACC2FBACD3AE0C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M52s.png" alt="0683p000009M52s.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Contents of the tJavaRow component:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;int compare = TalendDate.compareDate(TalendDate.parseDate("MM/dd/yyyy",row1.ETA),TalendDate.parseDate("MM/dd/yyyy","5/1/2019"));
System.out.println(row1.ETA + ":" + compare);&lt;/PRE&gt; 
&lt;P&gt;Output:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Starting job TestDate at 23:55 03/05/2019.

[statistics] connecting to socket on port 3424
[statistics] connected
5/1/2019:0
3/24/2019:-1
12/13/2017:-1
[statistics] disconnected

Job TestDate ended at 23:55 03/05/2019. [exit code=0]&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You should check your data input to make sure it does not contain that unexpected date value that you showed.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am also attaching the zip archive of the test job.&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LvWE"&gt;TestDate.zip&lt;/A&gt;</description>
      <pubDate>Sat, 04 May 2019 05:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289618#M62987</guid>
      <dc:creator>nfz11</dc:creator>
      <dc:date>2019-05-04T05:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing dynamic date with a specific date</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289619#M62988</link>
      <description>&lt;P&gt;I suspect that somewhere in your data there is a poorly formatted String date. Can you give a screenshot of your job so that it can provide a few clues?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 17:22:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Comparing-dynamic-date-with-a-specific-date/m-p/2289619#M62988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-06T17:22:44Z</dc:date>
    </item>
  </channel>
</rss>

