<?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>Expression to calculate Xth business day in a month?</title><link>https://community.appian.com/discussions/f/general/18511/expression-to-calculate-xth-business-day-in-a-month</link><description>Hello, 
 I have a requirement where I have a process model that needs to be triggered on the 5th business day of every month. I&amp;#39;ve already set the Timer Event on the Start Node of my process model on a monthly recurrence, however I&amp;#39;m having trouble writing</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Expression to calculate Xth business day in a month?</title><link>https://community.appian.com/thread/72892?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 06:35:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59d07fe3-831d-441f-aca8-92b26ccb0590</guid><dc:creator>Chitra Sharma</dc:creator><description>&lt;p&gt;Hi Mike, Its returning you 2/6/20 because it is the 4th business day of the month. Update the days to add 5&lt;/p&gt;
&lt;p&gt;workday(date(year(ri!date), month(ri!date), 1), 5)&lt;/p&gt;
&lt;p&gt;PS: Index in Appian starts from 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression to calculate Xth business day in a month?</title><link>https://community.appian.com/thread/72891?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 06:32:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35cf5c1d-bcd7-4bba-af2e-e12de6fd5774</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Following code returns the 5th business day for each month this year&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
  items: 1 + enumerate(12),
  expression: caladddays(date(2020, fv!item, 1), 4)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression to calculate Xth business day in a month?</title><link>https://community.appian.com/thread/72889?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 00:14:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:240e7532-5209-482d-b2c8-5c3d1b9028f2</guid><dc:creator>miked</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;workday(date(year(ri!date), month(ri!date), 1), 4)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But it&amp;#39;s returning incorrect values, especially when counting over weekends&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Example:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Passing in 2/15/20, returns 2/6/20, which is incorrect since the 5th business day of February is 2/7/20&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>