<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Date Difference Calc - Holiday Request Form</title><link>https://www.infopathdev.com:443/forums/thread/47139.aspx</link><pubDate>Fri, 18 Sep 2009 16:47:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47139</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47139.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=47139</wfw:commentRss><description>&lt;p&gt;It can be done with rules only:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/"&gt;http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Date Difference Calc - Holiday Request Form</title><link>https://www.infopathdev.com:443/forums/thread/26230.aspx</link><pubDate>Wed, 06 Feb 2008 16:43:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26230</guid><dc:creator>JOSIMS2</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26230.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26230</wfw:commentRss><description>&lt;p&gt;Sorry my bad, I meant to say we have both IP 2007 and SPS2007. &lt;/p&gt;&lt;p&gt;I will have a look into those suggestions and see where I get, im quite new using IP &amp;amp; SPS so its going to be a big learning curve!&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Date Difference Calc - Holiday Request Form</title><link>https://www.infopathdev.com:443/forums/thread/26228.aspx</link><pubDate>Wed, 06 Feb 2008 16:15:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26228</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26228.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26228</wfw:commentRss><description>&lt;p&gt;Welcome to the forum.&lt;/p&gt;
&lt;p&gt;If you have SharePoint 2003 then why are you concerned about browser compatibility?&amp;nbsp; You need SharePoint 2007 to render a form in a browser anyway. Are you planning on an upgrade in the near future?&lt;/p&gt;
&lt;p&gt;I have used the datediff() many times but I am sure there are similar functions in managed code.&lt;/p&gt;
&lt;p&gt;Another method is to cretate a list of dates and values and use that to make your calculation.&lt;/p&gt;
&lt;p&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&lt;/p&gt;
&lt;p&gt;01/01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/p&gt;
&lt;p&gt;01/02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/p&gt;
&lt;p&gt;01/03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/p&gt;
&lt;p&gt;Then you could use the sum function where startdate was less then enddate in list and enddate was greater than startdate in list.&lt;/p&gt;
&lt;p&gt;Another option since typiclaly holiday is not going to be for large date ranges is to break up the dates extract the days and then do a math calculation. Obviously you would have to take into account holidays which were over a month change.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Hope that helps.&lt;/p&gt;</description></item><item><title>Date Difference Calc - Holiday Request Form</title><link>https://www.infopathdev.com:443/forums/thread/26225.aspx</link><pubDate>Wed, 06 Feb 2008 14:14:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26225</guid><dc:creator>JOSIMS2</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26225.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26225</wfw:commentRss><description>&lt;p&gt;Hi there, ive searched the forums but cannot find a solution to the exact problem I have so im posting it here :)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;Ive made and published a browser compatible InfoPath 2007 holiday request form onto a SharePoint Server 2003 site, ive got all the basics working but now I need to display on the form the number of days the holiday request is for.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So what I need to calculate is the difference between the 2 date pickers I have on the form (startdate &amp;amp; enddate), less weekends and public holidays.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have found some solutions to the same question but all that I have found have been in VBScript, but im led to believe that using VBScript will mean my forms will no longer be browser compatible, so this is not an option :(&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Does anyone have a solution to this in Visual Basic or C#? &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>