<?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>Re: DatePicker - default to previous month?</title><link>https://www.infopathdev.com:443/forums/thread/83878.aspx</link><pubDate>Thu, 25 Oct 2012 16:10:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83878</guid><dc:creator>APMOB</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83878.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=83878</wfw:commentRss><description>&lt;p&gt;Figured it out...&lt;/p&gt;
&lt;p&gt;I used this formula to define the default value of the date picker control :&lt;/p&gt;
&lt;p&gt;addDays(today(), -((number(substring(today(), 9, 2)) + 1)))&lt;/p&gt;
&lt;p&gt;This takes today&amp;#39;s date (Oct 25th) , and deducts the number of days passed in the current month (25), plus one extra (i.e. 2&lt;u&gt;6&lt;/u&gt;)&lt;/p&gt;
&lt;p&gt;Thus returning the last day of the previous month (i.e. Sep 30th)&lt;/p&gt;
&lt;p&gt;With the date picker formatted to mmmm yyyy, this shows as the previous month (September 2012)&lt;/p&gt;
&lt;p&gt;(Although be aware / warned, the full value is technically the last day of the previous month, i.e, Sep &lt;u&gt;30th&lt;/u&gt;...)&lt;/p&gt;
&lt;p&gt;APMOB&lt;/p&gt;</description></item><item><title>DatePicker - default to previous month?</title><link>https://www.infopathdev.com:443/forums/thread/83868.aspx</link><pubDate>Thu, 25 Oct 2012 10:12:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83868</guid><dc:creator>APMOB</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83868.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=83868</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;Does anybody know if/how it is possible to set a datepicker control value to default to the previous month?&lt;/p&gt;
&lt;p&gt;So, for example, if someone were to open the form today (Oct 25th), the datepicker would default to Sep 25th?&lt;/p&gt;
&lt;p&gt;(The exact date isn&amp;#39;t important - I&amp;#39;m really only concerned with the month -&amp;nbsp;so any date in September would be fine...)&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sure it involves a combination of the addDays and today functions but not sure how to formulate them?&lt;/p&gt;
&lt;p&gt;Any suggestions would be most welcome!&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;APMOB&lt;/p&gt;</description></item></channel></rss>