<?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 Date and time diff in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Date-and-time-diff/m-p/2361897#M126147</link>
    <description>&lt;P&gt;I have a variable in a tMap that holds the hours and mins of a date diff, example result 02:15&lt;/P&gt;&lt;P&gt;I need to send that into excel and use it in a pivot table, but excel adds "1/1/1970" &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HtfSnAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155765i5659BDC47A3625DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HtfSnAAJ.png" alt="0695b00000HtfSnAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I was wondering if I instead of just holding the 02:15 in that variable can I add the current yyyy-MM-dd as a date.&lt;/P&gt;&lt;P&gt;So my file result into excel as a date would be 2021-08-21 02:15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think then I could parse out the hours and mins with hh:mm in excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless their is a better way to do the date diff other than this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TalendDate.diffDate(row29.Time, row29.CleaningTime , "SSS")&amp;nbsp;  &lt;B&gt;ms&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;String.format("%02d:%02d", (Var.ms / (1000 * 60 * 60)) % 24, (Var.ms / (1000 * 60)) % 60)&amp;nbsp; &lt;B&gt;total_time&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;TalendDate.parseDate("hh:mm",Var.total_time)&amp;nbsp;&lt;B&gt;var1&lt;/B&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:49:26 GMT</pubDate>
    <dc:creator>RVeitch_84</dc:creator>
    <dc:date>2024-11-15T23:49:26Z</dc:date>
    <item>
      <title>Date and time diff</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-and-time-diff/m-p/2361897#M126147</link>
      <description>&lt;P&gt;I have a variable in a tMap that holds the hours and mins of a date diff, example result 02:15&lt;/P&gt;&lt;P&gt;I need to send that into excel and use it in a pivot table, but excel adds "1/1/1970" &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000HtfSnAAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155765i5659BDC47A3625DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000HtfSnAAJ.png" alt="0695b00000HtfSnAAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I was wondering if I instead of just holding the 02:15 in that variable can I add the current yyyy-MM-dd as a date.&lt;/P&gt;&lt;P&gt;So my file result into excel as a date would be 2021-08-21 02:15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think then I could parse out the hours and mins with hh:mm in excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless their is a better way to do the date diff other than this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TalendDate.diffDate(row29.Time, row29.CleaningTime , "SSS")&amp;nbsp;  &lt;B&gt;ms&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;String.format("%02d:%02d", (Var.ms / (1000 * 60 * 60)) % 24, (Var.ms / (1000 * 60)) % 60)&amp;nbsp; &lt;B&gt;total_time&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;TalendDate.parseDate("hh:mm",Var.total_time)&amp;nbsp;&lt;B&gt;var1&lt;/B&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-and-time-diff/m-p/2361897#M126147</guid>
      <dc:creator>RVeitch_84</dc:creator>
      <dc:date>2024-11-15T23:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date and time diff</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Date-and-time-diff/m-p/2361898#M126148</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Try this expression build the datetime format:&lt;/P&gt;&lt;P&gt;TalendDate.formatDate("yyyy-MM-dd",TalendDate.getCurrentDate())+" "+your_total_time_string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 03:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Date-and-time-diff/m-p/2361898#M126148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-27T03:02:48Z</dc:date>
    </item>
  </channel>
</rss>

