<?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] Comparing Dates in tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354397#M120380</link>
    <description>Hi 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;This is my tMap filter condition: TalendDate.compareDate(row1.LAST_LOGIN_DATE,TalendDate.parseDate("mm/dd/yy",(String)globalMap.get("testDate"))) == 0&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;The date pattern should be "MM/dd/yy", MM presents month in a year, welll mm means minutes in a hour. 
&lt;BR /&gt;Shong</description>
    <pubDate>Thu, 04 Apr 2013 02:09:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-04-04T02:09:09Z</dc:date>
    <item>
      <title>[resolved] Comparing Dates in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354395#M120378</link>
      <description>Hi All, 
&lt;BR /&gt;I have been trying to figure out why my tMap isn't comparing dates properly. 
&lt;BR /&gt;I have created a globalmap string called "testDate" and set it to "04/03/13" ("mm/dd/yy" format). This is using tSetGlobalVar 
&lt;BR /&gt;I am then reading a table from an Oracle db that has 3 fields: User ID (integer), Login (String), and LoginDate (Date) 
&lt;BR /&gt;The tOracleInput then goes to a tMap for processing. 
&lt;BR /&gt;The goal is to get all users whose LoginDate matches the global "testDate" 
&lt;BR /&gt;This is my tMap filter condition: TalendDate.compareDate(row1.LAST_LOGIN_DATE,TalendDate.parseDate("mm/dd/yy",(String)globalMap.get("testDate"))) == 0 
&lt;BR /&gt;Basically I am parsing the the global testDate as TalendDate and then comparing that to the row date from Oracle. 
&lt;BR /&gt;My filter returns 0 results even though there are users whose login date match the criteria. 
&lt;BR /&gt;Any help would be amazing, thank you so much! 
&lt;BR /&gt;I am attaching images of my job, it is quite simple. 
&lt;BR /&gt;Here is some sample data from the tLogRow when I remove the filter condition in the tMap: 
&lt;BR /&gt;15419|user1|20-11-12 
&lt;BR /&gt;15574|user2|13-06-12 
&lt;BR /&gt;15580|user3|02-10-12 
&lt;BR /&gt;15593|user4|26-06-12 
&lt;BR /&gt;15608|user5|06-11-12 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEH7.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146757i4E2D12790D366B74/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEH7.jpg" alt="0683p000009MEH7.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEHC.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155083iAEAFDD9185E00F62/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEHC.jpg" alt="0683p000009MEHC.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEGU.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149578iA012B496044C0645/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEGU.jpg" alt="0683p000009MEGU.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEHH.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141022iA9481298838CFF60/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEHH.jpg" alt="0683p000009MEHH.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 03 Apr 2013 17:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354395#M120378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-03T17:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Comparing Dates in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354396#M120379</link>
      <description>Is the potential issue that I'm comparing row1.LAST_LOGIN_DATE which is of type Date with the result of a parseDate ?</description>
      <pubDate>Wed, 03 Apr 2013 23:24:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354396#M120379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-03T23:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Comparing Dates in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354397#M120380</link>
      <description>Hi 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;This is my tMap filter condition: TalendDate.compareDate(row1.LAST_LOGIN_DATE,TalendDate.parseDate("mm/dd/yy",(String)globalMap.get("testDate"))) == 0&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;The date pattern should be "MM/dd/yy", MM presents month in a year, welll mm means minutes in a hour. 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 04 Apr 2013 02:09:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354397#M120380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-04T02:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Comparing Dates in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354398#M120381</link>
      <description>Hi, that one change did not fix it, however, it led me on the path to the solution. 
&lt;BR /&gt;I found that there is a second TalendDate.compareDate that lets you specify which parts of the date to compare, so it worked when I changed my expression to: TalendDate.compareDate(row1.LAST_LOGIN_DATE,TalendDate.parseDate("mm/dd/yy",(String)globalMap.get("testDate")),"dd-MM-yyy") == 0 
&lt;BR /&gt;Thanks for the assistance shong!</description>
      <pubDate>Thu, 04 Apr 2013 17:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Comparing-Dates-in-tMap/m-p/2354398#M120381</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-04T17:01:17Z</dc:date>
    </item>
  </channel>
</rss>

