<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Date Calculation - Need to add a year and minus a day</title><link>https://www.infopathdev.com:443/forums/thread/103398.aspx</link><pubDate>Mon, 27 Jul 2015 06:59:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:103398</guid><dc:creator>donstephen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/103398.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=103398</wfw:commentRss><description>&lt;p&gt;Hi novaguy,&lt;br /&gt;&lt;br /&gt;Welcome to InfoPathDev.&lt;br /&gt;&lt;br /&gt;I have a form here which uses a simple formula to check if the year selected is a leap year or not. Please see attached form (download &amp;gt; right click &amp;gt; open in design mode) and check if you are able to add the logic to you form&amp;#39;s formula.&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;</description></item><item><title>Date Calculation - Need to add a year and minus a day</title><link>https://www.infopathdev.com:443/forums/thread/103388.aspx</link><pubDate>Fri, 24 Jul 2015 01:04:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:103388</guid><dc:creator>novaguy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/103388.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=103388</wfw:commentRss><description>I have a date picker field -  based on the date selected, I need to show another date field on the same form which is basically - Add one year minus a day.

AddDays does not cater for leap years. 

See attached screenshot of the code, works fine except if date chosen is 03/31/2015, the value calculated is 02/28/2016 - Should be 02/29/2016 as its a leap year.

PLEASE HELP. THANKS a Million all INFOPATH gurus out there.</description></item></channel></rss>