<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/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>doubt about how to validate two dates.</title><link>https://community.appian.com/discussions/f/rules/29682/doubt-about-how-to-validate-two-dates</link><description>Hi, I have a question, I need to evaluate two dates, one I have already solved, the one I have solved is like this: 
 I have a date, and I have to validate with a boolean that must receive a data from 3 months to here, if it is more than 3 months, it</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: doubt about how to validate two dates.</title><link>https://community.appian.com/thread/118319?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 09:40:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:90eb5765-4ac8-4ddd-85fe-c1197207b7cd</guid><dc:creator>anmolvijayvergiya</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/Screenshot-2023_2D00_08_2D00_23-152716.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: doubt about how to validate two dates.</title><link>https://community.appian.com/thread/117759?ContentTypeID=1</link><pubDate>Fri, 18 Aug 2023 07:29:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4658ea2d-e30b-41f7-a982-e08de5540f73</guid><dc:creator>Ignacio Mor&amp;#225;n</dc:creator><description>&lt;p&gt;Hi Gustavo,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think you are doing a workaround to format the received date (text) to date type in the current standard of your Appian environment.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see in the first local variable, you should put 10 as the parameter for the right() function, as a date has 10 characters: example: 11/11/2023 -&amp;gt; 10 characters.&lt;/p&gt;
&lt;p&gt;But I think this logic would be easier:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!tipoComprobante,
  /*I format the date I received to the standard*/
  local!formatDateText: datetext(userdatevalue(ri!date), &amp;quot;dd/MM/yyyy&amp;quot;),
  /* I transform it to date type*/
  local!finalDate: todate(local!formatDateText),
  /*Apply the logic needed*/
  {
    if(
      local!tipoComprobante = &amp;quot;INVOICE&amp;quot;,
      or(
        today() &amp;lt;= edate(local!finalDate, 3),
        today() + 1 &amp;gt; local!finalDate
      )
    ),
    false
  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Let me know if it works!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>