<?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] Difference between two dates excluding weekends in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203658#M4874</link>
    <description>You are welcome. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I think you can mark this post as 'resolved'.</description>
    <pubDate>Fri, 30 Oct 2015 10:29:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-10-30T10:29:20Z</dc:date>
    <item>
      <title>[resolved] Difference between two dates excluding weekends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203655#M4871</link>
      <description>Hi,
&lt;BR /&gt;I have a scenario where I have two dates in two columns(Create date and As of date) which comes in a file.
&lt;BR /&gt;I have to find the number of working days in between these two dates where the count excludes the weekends(Saturday and Sunday).
&lt;BR /&gt;Appreciate if I get the code to be written in Talend open Studio.
&lt;BR /&gt;Thanks
&lt;BR /&gt;Pradhab</description>
      <pubDate>Wed, 21 Oct 2015 11:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203655#M4871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-21T11:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Difference between two dates excluding weekends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203656#M4872</link>
      <description>Hello,
&lt;BR /&gt;Maybe you can create a routine and implement a method in this routine doing what you want.
&lt;BR /&gt;An example of method could be :
&lt;BR /&gt;
&lt;PRE&gt;public class NumberOfDays {&lt;BR /&gt; &amp;nbsp; &amp;nbsp;static int day_of_week;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;public static Integer getNumberOfDaysWorked(java.util.Date beginDate,java.util.Date endDate){&lt;BR /&gt;	 &amp;nbsp; Integer val = 0;&lt;BR /&gt;	 &amp;nbsp; while (beginDate.before(endDate)){&lt;BR /&gt;		 &amp;nbsp; day_of_week=TalendDate.getPartOfDate("DAY_OF_WEEK", beginDate);&lt;BR /&gt;		 &amp;nbsp; if(day_of_week != 1 &amp;amp;&amp;amp; day_of_week != 7){// 1 is for Sunday and 7 is for Saturday&lt;BR /&gt;			 &amp;nbsp; val = val+1;&lt;BR /&gt;		 &amp;nbsp; }&lt;BR /&gt;		 &amp;nbsp; beginDate = TalendDate.addDate(beginDate, 1, "dd");&lt;BR /&gt;	 &amp;nbsp; }&lt;BR /&gt;	 &amp;nbsp; return val;&lt;BR /&gt; &amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/PRE&gt;
&lt;BR /&gt;After that you call this method in a Tmap.
&lt;BR /&gt;I hope it can help you.</description>
      <pubDate>Wed, 21 Oct 2015 14:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203656#M4872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-21T14:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Difference between two dates excluding weekends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203657#M4873</link>
      <description>Thanks you so much for the code. I created a routine and implemented the method in it and called the method in the tmap in Talend. It worked as expected.&lt;BR /&gt;Thanks&lt;BR /&gt;Pradhab</description>
      <pubDate>Fri, 30 Oct 2015 10:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203657#M4873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-30T10:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Difference between two dates excluding weekends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203658#M4874</link>
      <description>You are welcome. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;I think you can mark this post as 'resolved'.</description>
      <pubDate>Fri, 30 Oct 2015 10:29:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Difference-between-two-dates-excluding-weekends/m-p/2203658#M4874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-30T10:29:20Z</dc:date>
    </item>
  </channel>
</rss>

