<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/73310.aspx</link><pubDate>Wed, 28 Dec 2011 20:07:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73310</guid><dc:creator>Melli111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73310.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73310</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy!&lt;/p&gt;&lt;p&gt;I actually had just found that shortly after I posted.&amp;nbsp; I put my own spin on it that mixed what was in the link I orginally used with the formula in the link you provided.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Instead of having the hidden sections show the day of week&amp;nbsp;I just use conditional rules to set a field to the string of the day of the week.&amp;nbsp; &lt;/p&gt;&lt;p&gt;If hiddenDayOfWeek = 1&lt;br /&gt;Action:&amp;nbsp; Set dayOfWeek = Monday&lt;/p&gt;&lt;p&gt;I still had the rules set, I had just accidently deleted the rule that set the hiddenDayOfWeek to get the 0 - 6 value.&amp;nbsp; So, I just popped that formula in from bizsupportonline and everything worked again.&amp;nbsp; :)&lt;/p&gt;&lt;p&gt;Adding a conditional rule for 0 - 6 (Sunday - Saturday)&lt;/p&gt;&lt;p&gt;Thanks again Jimmy,&lt;/p&gt;&lt;p&gt;Melissa&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/73309.aspx</link><pubDate>Wed, 28 Dec 2011 19:54:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73309</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73309</wfw:commentRss><description>&lt;p&gt;Have you tried this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.bizsupportonline.net/infopath2007/create-week-day-infopath-form-rules-formula.htm"&gt;http://www.bizsupportonline.net/infopath2007/create-week-day-infopath-form-rules-formula.htm&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/73308.aspx</link><pubDate>Wed, 28 Dec 2011 19:31:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73308</guid><dc:creator>Melli111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73308.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73308</wfw:commentRss><description>&lt;p&gt;Hi Frederik,&lt;/p&gt;&lt;p&gt;I know this post is old, but I&amp;#39;m hoping that you happen to have an updated URL to the link you posted in 2009?&amp;nbsp; I used the link about a year ago and it worked great, but now the blog has been deleted.&amp;nbsp; Unfortunately somehow my rules got deleted and I don&amp;#39;t remember anything about how it was done.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Thanks in advance!&lt;/p&gt;&lt;p&gt;Melissa&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/58205.aspx</link><pubDate>Fri, 20 Aug 2010 14:10:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58205</guid><dc:creator>Michael Vasquez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58205.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58205</wfw:commentRss><description>&lt;p&gt;Bad things about the rules above is that when you change the date for the first time it works but if you change again, lets say you first pick a Friday and then you want to pick a Thursday, nothing happens.&amp;nbsp; If you pick a date for the next month, it works.&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/58204.aspx</link><pubDate>Fri, 20 Aug 2010 14:08:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58204</guid><dc:creator>Michael Vasquez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58204.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58204</wfw:commentRss><description>&lt;p&gt;substitute the quotes and minus sign with the one on your keyboard.&amp;nbsp; Infopath does not like the way it is formated when you copy and paste from the Web page.&amp;nbsp; You have to delete the quotes and minus sign and re-type them.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/56737.aspx</link><pubDate>Sat, 10 Jul 2010 10:59:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:56737</guid><dc:creator>sivarao.n</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/56737.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=56737</wfw:commentRss><description>&lt;p&gt;Hi Frederik,&lt;/p&gt;
&lt;p&gt;Thank a lot for your post. It&amp;#39;s really very helpfull post.&lt;/p&gt;
&lt;p&gt;But some how i am getting error while using below formulas.&lt;/p&gt;
&lt;p&gt;1. Set Default Value of Field MyDay to &lt;em&gt;normalize-space(substring-after(substring-after(../my:MyDate, “-”), “-”))&lt;/em&gt;&lt;br /&gt;2. Set Default Value of Field MyMonth to &lt;em&gt;normalize-space(substring-before(substring-after(../my:MyDate, “-”), “-”))&lt;/em&gt;&lt;br /&gt;3. Set Default Value of Field MyYear to &lt;em&gt;normalize-space(substring-before(../my:MyDate, “-”))&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I tried like this &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;normalize-space(substring-after(substring-after(../my:MyDate, “-”), “-”))&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;br /&gt;and &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(substring-after(substring-after(../my:MyDate, “-”), “-”))&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;but i am getting error like&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Unexpected character.&lt;br /&gt;(substring-after(substring-after(../my:MyDate, --&amp;gt;“&amp;lt;---”), “-”))&lt;br /&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;br /&gt;(Expected value type: end-of-string&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Actual value: name&lt;br /&gt;Unexpected --&amp;gt;character.&lt;br /&gt;&amp;lt;--(substring-after(substring-after(../my:MyDate, --&amp;gt;“&amp;lt;---”), “-”))&lt;br /&gt;)&lt;/p&gt;&lt;/em&gt;
&lt;p&gt;&lt;em&gt;Could you Please help me how to use above formula. thanks for your help&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thanks,&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Siva.&lt;/em&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/p&gt;&lt;/em&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/49323.aspx</link><pubDate>Mon, 23 Nov 2009 09:23:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49323</guid><dc:creator>Frederik Van Lierde</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49323.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=49323</wfw:commentRss><description>&lt;p&gt;It is possible codeless&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The previous reply gave a link to an already codeless way of doing it, using e secondary datasource, the next link gives another solution without secondary datasources (1 formula and rules)&lt;/p&gt;
&lt;p&gt;Have a look at &lt;a href="http://blueinfopath.wordpress.com/2009/11/22/weekday-name-function-in-infopath/"&gt;http://blueinfopath.wordpress.com/2009/11/22/weekday-name-function-in-infopath/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/39029.aspx</link><pubDate>Fri, 27 Feb 2009 22:03:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39029</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39029.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=39029</wfw:commentRss><description>&lt;p&gt;If anyone interested same with no code:&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: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/28596.aspx</link><pubDate>Wed, 07 May 2008 23:31:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28596</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28596.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28596</wfw:commentRss><description>&lt;p&gt;Great! Glad to hear it&amp;#39;s working!&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/28579.aspx</link><pubDate>Wed, 07 May 2008 18:17:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28579</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28579.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28579</wfw:commentRss><description>&lt;p&gt;thanks!&amp;nbsp; that worked great.&amp;nbsp; I had a data type wrong, and now all is well.&lt;/p&gt;</description></item><item><title>Re: Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/28520.aspx</link><pubDate>Mon, 05 May 2008 22:52:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28520</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28520.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28520</wfw:commentRss><description>&lt;p&gt;You need to first get the text value of the date (forgive me if I write bad VB -- I&amp;#39;m not fluent in it):&lt;/p&gt;
&lt;p&gt;Dim dtString as New String&lt;br /&gt;dtString = thisXDocument.DOM.selectSingleNode(&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:WeekBeginning&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;).text&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Dim&lt;font color="#333333" size="2"&gt; dt &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font color="#333333" size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font color="#333333" size="2"&gt; DateTime&lt;br /&gt;dt = DateTime.Parse(dtString) &amp;#39; Probably want to do some error checking here before you process the next line. Or you could use a try/catch statement.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:DayOfweek&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;).text = dt.DayOfWeek&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Day of week from date picker</title><link>https://www.infopathdev.com:443/forums/thread/28461.aspx</link><pubDate>Thu, 01 May 2008 17:58:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28461</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28461</wfw:commentRss><description>&lt;p&gt;My problem today is taking the date chosen from a date picker (&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:Week/my:WeekBeginning&amp;quot;&lt;/font&gt;) within infopath and finding the day of the week for that date.&amp;nbsp; I am using vb.net language(compatible with 2003).&amp;nbsp; I think it is a formatting of the xml date to the correct format for the weekday function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have gotten this to work:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; dt &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;font size="2"&gt; DateTime(2008, 5, 1)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/my:DayOfweek&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;).text = dt.DayOfWeek&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;That returns 4, then I can create a Case statement to check and enter the day.&amp;nbsp; My problem is that the day isn&amp;#39;t always may 1st, 2008, it is selected from the date picker.&amp;nbsp; My ultimate goal is to verify that the day selected is a saturday, if not, show a message, and zero the date picker.&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;I am just at a lost today with it, any help would be appreciated.&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>