<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Date Picker minus weekends and holidays - Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/38047.aspx</link><pubDate>Tue, 03 Feb 2009 15:32:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38047</guid><dc:creator>mrdesignit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38047.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=38047</wfw:commentRss><description>&lt;p&gt;I have looked into several VB Scripts and have yet to discover what the code should look like if I would like to exclude the weekends and Holidays.&amp;nbsp; The ones that I have seen don&amp;#39;t seem to work or I am missing something.&amp;nbsp; Below is the Expression I am using on the starting date;&lt;/p&gt;&lt;p&gt;(number(substring(@Ending_Date, 9, 2)) + floor((153 * (number(substring(@Ending_Date, 6, 2)) + 12 * (floor((14 - number(substring(@Ending_Date, 6, 2))) / 12)) - 3) + 2) / 5) + (number(substring(@Ending_Date, 1, 4)) + 4800 - (floor((14 - number(substring(@Ending_Date, 6, 2))) / 12))) * 365 + floor((number(substring(@Ending_Date, 1, 4)) + 4800 - (floor((14 - number(substring(@Ending_Date, 6, 2))) / 12))) / 4) - floor((number(substring(@Ending_Date, 1, 4)) + 4800 - (floor((14 - number(substring(@Ending_Date, 6, 2))) / 12))) / 100) + floor((number(substring(@Ending_Date, 1, 4)) + 4800 - (floor((14 - number(substring(@Ending_Date, 6, 2))) / 12))) / 400) - 32045) - (number(substring(., 9, 2)) + floor((153 * (number(substring(., 6, 2)) + 12 * (floor((14 - number(substring(., 6, 2))) / 12)) - 3) + 2) / 5) + (number(substring(., 1, 4)) + 4800 - (floor((14 - number(substring(., 6, 2))) / 12))) * 365 + floor((number(substring(., 1, 4)) + 4800 - (floor((14 - number(substring(., 6, 2))) / 12))) / 4) - floor((number(substring(., 1, 4)) + 4800 - (floor((14 - number(substring(., 6, 2))) / 12))) / 100) + floor((number(substring(., 1, 4)) + 4800 - (floor((14 - number(substring(., 6, 2))) / 12))) / 400) - 32045) &lt;/p&gt;&lt;p&gt;&amp;nbsp;The problem is this code works along with another Date Picker &amp;quot;Ending Date&amp;quot;&amp;nbsp; They cross check each other and then write the difference of the two in another Text Field.&amp;nbsp; I need the users not allow the weekends.&amp;nbsp; Also if I decide I need Monday - Friday off, the system shows this as 4 days off, assuming I&amp;#39;m returning on Friday.&amp;nbsp; Is there a fix for that as well. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>