<?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: Date comparison issue - Date.before and Date.after in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283814#M57638</link>
    <description>Hi,&lt;BR /&gt;Thius may not be pretty but it wqorks as a solution :-&lt;BR /&gt;row4.END_TIME_DT != null &amp;amp;&amp;amp; (row2.date_2.before(row4.END_TIME_DT) || row2.date_2.equals(row4.END_TIME_DT))&lt;BR /&gt;&amp;amp;&amp;amp; row4.START_TIME_DT != null &amp;amp;&amp;amp;  (row2.date_2.after(row4.START_TIME_DT) || row2.date_2.equals(row4.START_TIME_DT))</description>
    <pubDate>Tue, 24 Feb 2009 22:49:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-02-24T22:49:43Z</dc:date>
    <item>
      <title>Date comparison issue - Date.before and Date.after</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283813#M57637</link>
      <description>Hi,
&lt;BR /&gt;In a lookup expression I am using the date checking code :-
&lt;BR /&gt;row4.END_TIME_DT != null &amp;amp;&amp;amp; row2.date_2.before(row4.END_TIME_DT) 
&lt;BR /&gt;&amp;amp;&amp;amp; row4.START_TIME_DT != null &amp;amp;&amp;amp; row2.date_2.after(row4.START_TIME_DT)
&lt;BR /&gt;This works great if the row2.date_2 is after row4.START_TIME_DT but not if it is EQUAL to.
&lt;BR /&gt;All dates are in mm/dd/yyyy hh:mm:ss format.
&lt;BR /&gt;My issue is how do I test for row2.date_2 'equal to' or 'greater than' row4.START_TIME_DT in the expression??
&lt;BR /&gt;Thanks on advance,</description>
      <pubDate>Sat, 16 Nov 2024 14:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283813#M57637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison issue - Date.before and Date.after</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283814#M57638</link>
      <description>Hi,&lt;BR /&gt;Thius may not be pretty but it wqorks as a solution :-&lt;BR /&gt;row4.END_TIME_DT != null &amp;amp;&amp;amp; (row2.date_2.before(row4.END_TIME_DT) || row2.date_2.equals(row4.END_TIME_DT))&lt;BR /&gt;&amp;amp;&amp;amp; row4.START_TIME_DT != null &amp;amp;&amp;amp;  (row2.date_2.after(row4.START_TIME_DT) || row2.date_2.equals(row4.START_TIME_DT))</description>
      <pubDate>Tue, 24 Feb 2009 22:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283814#M57638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-02-24T22:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison issue - Date.before and Date.after</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283815#M57639</link>
      <description>You can also use the method compareTo of the Date object.&lt;BR /&gt;For instance, if date1 = "01-JAN-2009" and date2 = "02-JAN-2009" then date1.compareTo(date2) will be equal to -1.&lt;BR /&gt;If date1 = "02-JAN-2009" and date2 = "02-JAN-2009" then date1.compareTo(date2) will be equal to 0.&lt;BR /&gt;If date1 = "03-JAN-2009" and date2 = "02-JAN-2009" then date1.compareTo(date2) will be equal to 1.&lt;BR /&gt;Then to get a test if a date is after or equal to another, you can test &lt;PRE&gt;if (date1.compareTo(date2) &amp;gt;=0)&lt;/PRE&gt;&lt;BR /&gt;Arnaud</description>
      <pubDate>Wed, 25 Feb 2009 07:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-comparison-issue-Date-before-and-Date-after/m-p/2283815#M57639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-02-25T07:57:43Z</dc:date>
    </item>
  </channel>
</rss>

