<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Adding a Year to a date</title><link>https://www.infopathdev.com:443/forums/thread/52171.aspx</link><pubDate>Thu, 25 Feb 2010 01:04:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52171</guid><dc:creator>aberya</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52171.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=52171</wfw:commentRss><description>&lt;p&gt;Hi Guys&lt;/p&gt;
&lt;p&gt;I am using InfoPath 2007 with MOSS 2007 Form Services.&lt;/p&gt;
&lt;p&gt;Does anyone know the correct formula to add a year minus one day to a date in InfoPath?&amp;nbsp; I cannot use&amp;nbsp;code because I want the form to be usable in Form Services and Offline in InfoPath so I am limited to the xpath formulas.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So far I have a formula that adds a year but it doesn&amp;#39;t take into account leap years.&lt;/p&gt;
&lt;p&gt;concat(string(number(substring-before(.,&amp;quot;-&amp;quot;)) + 1),&amp;quot;-&amp;quot;, substring-after(.,&amp;quot;-&amp;quot;))&lt;/p&gt;
&lt;p&gt;Unfortunately I was using AddDays(365) but there appears to be a problem with sharepoint setting&amp;nbsp;dates to Zulu time (Z) which xpath AddDays doesn&amp;#39;t appear to handle.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Alan&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>