<?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: Display the last date of the month in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945648#M18369</link>
    <description>&lt;P&gt;You can calculate the last day of the month based on some date using this expression. Where myDate is the Datum dataitem in your example. Depending on your version of Visual Analytics you can subtract a number directly from a date, otherwise you need to use the TreatAs function.&lt;/P&gt;
&lt;PRE&gt;DateFromMDY(
    Mod(Month(myDate), 12) + 1
    , 1
    , Year(myDate) + Trunc(Month(myDate) / 12)
)
- 1&lt;/PRE&gt;
&lt;P&gt;Once you have the new data item, you can use it in a filter to specify some like&amp;nbsp;&lt;BR /&gt;datum = last_day_of_month&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2024 09:11:56 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2024-09-30T09:11:56Z</dc:date>
    <item>
      <title>Display the last date of the month</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945640#M18366</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it also possible in SAS VIYA to display the last date of the month? I currently have a table with various dates and values. However, I only want to see the last day of the respective month. Is this possible in SAS VIYA?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In any case, thank you for the responses. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards, Hans&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Knipsel.JPG" style="width: 226px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100758i1933B407A0A87345/image-size/large?v=v2&amp;amp;px=999" role="button" title="Knipsel.JPG" alt="Knipsel.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 08:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945640#M18366</guid>
      <dc:creator>HansSteenhuis</dc:creator>
      <dc:date>2024-09-30T08:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Display the last date of the month</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945642#M18367</link>
      <description>&lt;P&gt;We would need more information like:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;are you writing a SAS program&lt;/LI&gt;
&lt;LI&gt;are you using Visual Analytics&lt;/LI&gt;
&lt;LI&gt;Is it the last day of the month as of today or something else&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 30 Sep 2024 08:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945642#M18367</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2024-09-30T08:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display the last date of the month</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945645#M18368</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm using Visual Analytics (VIYA).&amp;nbsp;It concerns the last day of the month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I only want to see the dates highlighted in yellow (see image).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 08:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945645#M18368</guid>
      <dc:creator>HansSteenhuis</dc:creator>
      <dc:date>2024-09-30T08:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Display the last date of the month</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945648#M18369</link>
      <description>&lt;P&gt;You can calculate the last day of the month based on some date using this expression. Where myDate is the Datum dataitem in your example. Depending on your version of Visual Analytics you can subtract a number directly from a date, otherwise you need to use the TreatAs function.&lt;/P&gt;
&lt;PRE&gt;DateFromMDY(
    Mod(Month(myDate), 12) + 1
    , 1
    , Year(myDate) + Trunc(Month(myDate) / 12)
)
- 1&lt;/PRE&gt;
&lt;P&gt;Once you have the new data item, you can use it in a filter to specify some like&amp;nbsp;&lt;BR /&gt;datum = last_day_of_month&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 09:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945648#M18369</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2024-09-30T09:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Display the last date of the month</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945655#M18370</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much. It worked!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 09:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945655#M18370</guid>
      <dc:creator>HansSteenhuis</dc:creator>
      <dc:date>2024-09-30T09:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display the last date of the month</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945707#M18371</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194784"&gt;@HansSteenhuis&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm using Visual Analytics (VIYA).&amp;nbsp;It concerns the last day of the month.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I only want to see the dates highlighted in yellow (see image).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One simple way to test if a value is the last day of the month is to check if the next day is a different month.&lt;/P&gt;
&lt;P&gt;In normal SAS code such a test could be :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;month(datum)&amp;nbsp;ne month(datum+1)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which will be TRUE when DATUM is the last day of a month.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 16:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-the-last-date-of-the-month/m-p/945707#M18371</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-30T16:17:07Z</dc:date>
    </item>
  </channel>
</rss>

