<?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] Adding 2 Dates in Installing and Upgrading</title>
    <link>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354859#M1405</link>
    <description>Hi Lmit, 
&lt;BR /&gt;Try the following approach: 
&lt;BR /&gt;1. Separate the 2 dates to be added; the 1st one would be of the format "yyyy-MM-dd HH:mm:ss" &amp;amp; the 2nd one of "HH:mm:ss" 
&lt;BR /&gt;2. Now extract the Hour, Minute &amp;amp; Seconds part from the 2nd date, &amp;amp; convert it to Integer format. 
&lt;BR /&gt;3. Then use something like this: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;TalendDate.addDate(TalendDate.addDate((TalendDate.addDate(Var.base_time,"yyyy-MM-dd HH:mm:ss",Var.tobeadded_time_hh,"HH")),"yyyy-MM-dd HH:mm:ss",Var.tobeadded_time_mm,"mm"),"yyyy-MM-dd HH:mm:ss",Var.tobeadded_time_ss,"ss") &amp;nbsp;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;This would add Hours, as well as Minutes, as well as Seconds. 
&lt;BR /&gt;Hope this should work for you. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;MathurM</description>
    <pubDate>Mon, 22 Dec 2014 10:45:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-12-22T10:45:52Z</dc:date>
    <item>
      <title>[resolved] Adding 2 Dates</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354856#M1402</link>
      <description>Hi,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I want to add 2 dates which are coming in my input along with time.&lt;BR /&gt;My Input is&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Arial, sans-serif"&gt;2015-02-26 08:00:00 &amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Arial, sans-serif"&gt;1900-01-01 09:00:00&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Arial, sans-serif"&gt;My Output should be&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;2015-02-26 17:00:00&lt;BR /&gt;In my output my date should be same which is coming from first column.&lt;BR /&gt;Thanks In advance&lt;BR /&gt;Lmit&amp;nbsp;</description>
      <pubDate>Sat, 16 Nov 2024 11:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354856#M1402</guid>
      <dc:creator>lmit</dc:creator>
      <dc:date>2024-11-16T11:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Adding 2 Dates</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354857#M1403</link>
      <description>Get respectively the hours, minutes and seconds of the second date, for example,
&lt;BR /&gt;tFileInputDelimited--main--tJavaRow--main--tMap....
&lt;BR /&gt;on tJavaRow
&lt;BR /&gt;
&lt;PRE&gt;context.hours=row1.secondColumnName.getHours();&lt;BR /&gt;context.minutes....&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;Then, add hours, minutes and seconds to the first date using built-in function on tMap, for example:
&lt;BR /&gt;
&lt;PRE&gt;TalendDate.addDate(row1.firstColumnName,context.hours,"HH")&lt;/PRE&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 17 Dec 2014 02:39:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354857#M1403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-17T02:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Adding 2 Dates</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354858#M1404</link>
      <description>Thanks for your reply Shong...I need to consider Minutes and Seconds also.how can i get it?
&lt;BR /&gt;My Input
&lt;BR /&gt;2015-02-26 08:20:00 1900-01-01 09:40:00
&lt;BR /&gt;Output&amp;nbsp;
&lt;BR /&gt;2015-02-26 17:60:00.
&lt;BR /&gt;Minutes and seconds also need to get added
&lt;BR /&gt;Thanks In Advance
&lt;BR /&gt;Lmit</description>
      <pubDate>Thu, 18 Dec 2014 07:05:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354858#M1404</guid>
      <dc:creator>lmit</dc:creator>
      <dc:date>2014-12-18T07:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Adding 2 Dates</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354859#M1405</link>
      <description>Hi Lmit, 
&lt;BR /&gt;Try the following approach: 
&lt;BR /&gt;1. Separate the 2 dates to be added; the 1st one would be of the format "yyyy-MM-dd HH:mm:ss" &amp;amp; the 2nd one of "HH:mm:ss" 
&lt;BR /&gt;2. Now extract the Hour, Minute &amp;amp; Seconds part from the 2nd date, &amp;amp; convert it to Integer format. 
&lt;BR /&gt;3. Then use something like this: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;TalendDate.addDate(TalendDate.addDate((TalendDate.addDate(Var.base_time,"yyyy-MM-dd HH:mm:ss",Var.tobeadded_time_hh,"HH")),"yyyy-MM-dd HH:mm:ss",Var.tobeadded_time_mm,"mm"),"yyyy-MM-dd HH:mm:ss",Var.tobeadded_time_ss,"ss") &amp;nbsp;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;This would add Hours, as well as Minutes, as well as Seconds. 
&lt;BR /&gt;Hope this should work for you. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;MathurM</description>
      <pubDate>Mon, 22 Dec 2014 10:45:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354859#M1405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-22T10:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Adding 2 Dates</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354860#M1406</link>
      <description>I performed the whole operation in a tMap (you can work with any other component of your choice) 
&lt;BR /&gt;The following is the output 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC1m.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137131i83FC2E8A3C82A71A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC1m.png" alt="0683p000009MC1m.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 22 Dec 2014 10:49:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/resolved-Adding-2-Dates/m-p/2354860#M1406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-22T10:49:30Z</dc:date>
    </item>
  </channel>
</rss>

