<?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: How to extract Month and Year from the date? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858606#M339235</link>
    <description>&lt;P&gt;You can use the `MONTH()` and `YEAR()` functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/p13eycdrmfb0l8n1492z3wocpt3s.htm" target="_self"&gt;YEAR Function&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/n0bn6385z4pweqn1qrpmklqtln99.htm" target="_self"&gt;MONTH Function&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 20:19:06 GMT</pubDate>
    <dc:creator>maguiremq</dc:creator>
    <dc:date>2023-02-13T20:19:06Z</dc:date>
    <item>
      <title>How to extract Month and Year from the date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858603#M339233</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;How to extract a Month and Year from the format,&amp;nbsp;11/12/2018?&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 20:11:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858603#M339233</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2023-02-13T20:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Month and Year from the date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858605#M339234</link>
      <description>&lt;P&gt;The format has nothing to do with it. If it the value is a SAS date value then you use the Month and Year (or Day or Qtr) functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data example;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; month=month(today());&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; year&amp;nbsp;&amp;nbsp; =year(today());&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;Use your SAS date-valued variable inplace of the Today() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a character value that looks like 11/12/2018 that's another story.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 20:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858605#M339234</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-13T20:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Month and Year from the date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858606#M339235</link>
      <description>&lt;P&gt;You can use the `MONTH()` and `YEAR()` functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/p13eycdrmfb0l8n1492z3wocpt3s.htm" target="_self"&gt;YEAR Function&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/n0bn6385z4pweqn1qrpmklqtln99.htm" target="_self"&gt;MONTH Function&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 20:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-extract-Month-and-Year-from-the-date/m-p/858606#M339235</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2023-02-13T20:19:06Z</dc:date>
    </item>
  </channel>
</rss>

