<?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: TalendDate.diffDate wrong results? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374184#M136815</link>
    <description>could it be that you had dates in your dataset as Strings - when you had value -42188&lt;BR /&gt;and then by CASTing them into Date - you have the correct value?</description>
    <pubDate>Mon, 17 Jun 2013 16:12:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-06-17T16:12:56Z</dc:date>
    <item>
      <title>TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374183#M136814</link>
      <description>With a tMap i am joining a csv file (row4) and a lookup csv file (row3) into a MySQL table. They have a key id for the inner join.&lt;BR /&gt;Having &lt;BR /&gt;row4.DATA_INVIO=         2013-04-01 12:47:49        type Date "yyyy-MM-dd HH:mm:ss"&lt;BR /&gt;row3.DATA_CREAZIONE= 2013-04-01 12:30:57        type Date "yyyy-MM-dd HH:mm:ss"&lt;BR /&gt;in the Var box of the tMap I calculate the difference in seconds between two dates:&lt;BR /&gt;TalendDate.diffDate(row4.DATA_INVIO, row3.DATA_CREAZIONE, "ss")&lt;BR /&gt;Result= -42188   WRONG!&lt;BR /&gt;But if in the Var box of the tMap I put this (same dates)...&lt;BR /&gt;TalendDate.diffDate(TalendDate.parseDate("yyyy-MM-dd HH:mm:ss","2013-04-01 12:47:49"), TalendDate.parseDate("yyyy-MM-dd HH:mm:ss","2013-04-01 12:30:57"), "ss")&lt;BR /&gt;Result = 1012   GOOD!&lt;BR /&gt;What is happening????&lt;BR /&gt;I'm having the same problems with many raws, it's not random, it seems that some rows always give wrong results...&lt;BR /&gt;Any suggestion is highly appreciated.&lt;BR /&gt;Stefano</description>
      <pubDate>Sat, 16 Nov 2024 11:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374183#M136814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374184#M136815</link>
      <description>could it be that you had dates in your dataset as Strings - when you had value -42188&lt;BR /&gt;and then by CASTing them into Date - you have the correct value?</description>
      <pubDate>Mon, 17 Jun 2013 16:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374184#M136815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-17T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374185#M136816</link>
      <description>Try printing row4.DATA_INVIO and row3.DATA_CREAZIONE to the console to check the timezone offset on them?</description>
      <pubDate>Tue, 18 Jun 2013 00:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374185#M136816</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-06-18T00:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374186#M136817</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;could it be that you had dates in your dataset as Strings - when you had value -42188&lt;BR /&gt;and then by CASTing them into Date - you have the correct value?&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;ok, I have defined the text delimited metadata date field from Date to String&lt;BR /&gt;row4.DATA_INVIO           type String&lt;BR /&gt;row3.DATA_CREAZIONE   type String&lt;BR /&gt;then I have put this formula:&lt;BR /&gt;TalendDate.diffDate(TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",row4.DATA_INVIO), TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",row3.DATA_CREAZIONE), "ss")&lt;BR /&gt;and it works well now.&lt;BR /&gt;The question remains: why it doesn't work with Date datatype?&lt;BR /&gt;Thank you very much for the advice.&lt;BR /&gt;Stefano</description>
      <pubDate>Tue, 18 Jun 2013 11:22:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374186#M136817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T11:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374187#M136818</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Try printing row4.DATA_INVIO and row3.DATA_CREAZIONE to the console to check the timezone offset on them?&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;How can i print to the console? I don't know it...&lt;BR /&gt;Thank you</description>
      <pubDate>Tue, 18 Jun 2013 11:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374187#M136818</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T11:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374188#M136819</link>
      <description>Hi 
&lt;BR /&gt; 
&lt;BR /&gt;System.out.println("value " +value); 
&lt;BR /&gt;Ex: System.out.println("value " +TalendDate.diffDate(TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",row4.DATA_INVIO), TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",row3.DATA_CREAZIONE), "ss")); 
&lt;BR /&gt;use the above syntax in tjava/tjavarow/tjavaflex 
&lt;BR /&gt;For more help on I\O Streams in java please refer the link: 
&lt;A href="http://way2java.com/io/system-out-println/" rel="nofollow noopener noreferrer"&gt;http://way2java.com/io/system-out-println/&lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;thanks 
&lt;BR /&gt;Anil Kumar Burri 
&lt;BR /&gt; 
&lt;A href="http://anilkumarburri.wordpress.com/" rel="nofollow noopener noreferrer"&gt;http://anilkumarburri.wordpress.com/&lt;/A&gt;</description>
      <pubDate>Tue, 18 Jun 2013 11:59:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374188#M136819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-18T11:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: TalendDate.diffDate wrong results?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374189#M136820</link>
      <description>&lt;TABLE&gt;
 &lt;TBODY&gt;
  &lt;TR&gt;
   &lt;TD width="139"&gt;&lt;P&gt;Manufacturing date&lt;/P&gt;&lt;/TD&gt;
   &lt;TD width="397"&gt;&lt;P&gt;Number of days from the Manufacturing date (till date)&lt;/P&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
   &lt;TD width="139"&gt;&lt;P&gt;01-01-2019&lt;/P&gt;&lt;/TD&gt;
   &lt;TD width="397"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
  &lt;/TR&gt;
 &lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 11 Dec 2019 04:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/TalendDate-diffDate-wrong-results/m-p/2374189#M136820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-11T04:46:27Z</dc:date>
    </item>
  </channel>
</rss>

