<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: get last available business date in previous month in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181352#M46185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So which are &lt;STRONG&gt;your&lt;/STRONG&gt; business days?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Feb 2014 22:11:41 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-02-20T22:11:41Z</dc:date>
    <item>
      <title>get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181349#M46182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset called myds which has the below columns date code I would like to add another column called prevmonthdate which is the last business date of the previous month Thanks, HD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 21:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181349#M46182</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2014-02-20T21:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181350#M46183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need to account for holidays?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 21:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181350#M46183</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-20T21:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181351#M46184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no just business days..thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 22:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181351#M46184</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2014-02-20T22:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181352#M46185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So which are &lt;STRONG&gt;your&lt;/STRONG&gt; business days?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 22:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181352#M46185</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-02-20T22:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181353#M46186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry for being so unclear long day.. i mean just monday to friday only week days&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 22:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181353#M46186</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2014-02-20T22:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181354#M46187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably a better way than this, specifically to check if its a Saturday/Sunday. I also believe this question is answered on here, so searching will probably get you a better response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to 12;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date=mdy(i, 15, 2014);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_business_day=intnx('month', date, -1, 'end');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if weekday(last_business_day) =1 then last_business_day=last_business_day-2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if weekday(last_business_day)=7 then last_business_day=last_business_day-1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format date last_business_day date9.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 22:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181354#M46187</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-20T22:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181355#M46188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternative way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;Data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;Date = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: Consolas;"&gt;"21Feb2014"d;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;last_month_busday = intnx(&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 9pt;"&gt;'WEEKDAY'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;, intnx(&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 9pt;"&gt;'MONTH'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;, date, -&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 9pt;"&gt;'END'&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;), &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background: white; font-family: Consolas;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;format last_month_busday date9.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 9pt;"&gt;run; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 22:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181355#M46188</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-02-20T22:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181356#M46189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THank you. Both answers are correct!! Thanks very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 15:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181356#M46189</guid>
      <dc:creator>hdg</dc:creator>
      <dc:date>2014-02-21T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: get last available business date in previous month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181357#M46190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SASKiwi answer is preferable to mine, more efficient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 17:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/get-last-available-business-date-in-previous-month/m-p/181357#M46190</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-02-21T17:55:13Z</dc:date>
    </item>
  </channel>
</rss>

