<?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 change the year to current year without changing the month and day? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671245#M201542</link>
    <description>So the source has a data type of date&lt;BR /&gt;Here's what I did:&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table test2 as select &lt;BR /&gt;ID&lt;BR /&gt;,mdy(month(date), day(date), 2020) AS next_dt&lt;BR /&gt;from test1&lt;BR /&gt;group by ID;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;THEN RESULT:&lt;BR /&gt;ID     next_dt (data type numeric)&lt;BR /&gt;001	22189&lt;BR /&gt;001	22156&lt;BR /&gt;&lt;BR /&gt;How do I change the data type of next_dt field to date?</description>
    <pubDate>Wed, 22 Jul 2020 00:29:53 GMT</pubDate>
    <dc:creator>mrafael03</dc:creator>
    <dc:date>2020-07-22T00:29:53Z</dc:date>
    <item>
      <title>How to change the year to current year without changing the month and day?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671231#M201533</link>
      <description>&lt;P&gt;Date Set&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;DATE&lt;/P&gt;
&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/01/2014&lt;BR /&gt;002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 08/29/2019&lt;/P&gt;
&lt;P&gt;&amp;nbsp;003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/17/2020&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected Result&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;DATE&lt;/P&gt;
&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/01/20&lt;STRONG&gt;20&lt;/STRONG&gt;&lt;BR /&gt;002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 08/29/20&lt;STRONG&gt;20&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;003&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/17/2020&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 22:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671231#M201533</guid>
      <dc:creator>mrafael03</dc:creator>
      <dc:date>2020-07-21T22:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the year to current year without changing the month and day?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671232#M201534</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date=mdy(month(date), day(date), 2020);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Jul 2020 22:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671232#M201534</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-21T22:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the year to current year without changing the month and day?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671237#M201538</link>
      <description>it's returning 0 value</description>
      <pubDate>Tue, 21 Jul 2020 23:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671237#M201538</guid>
      <dc:creator>mrafael03</dc:creator>
      <dc:date>2020-07-21T23:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the year to current year without changing the month and day?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671240#M201539</link>
      <description>&lt;P&gt;In the original data set, is variable date a true SAS date value? Is it numeric or character?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the full log of this data step, do not chop anything out.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Jul 2020 23:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671240#M201539</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-21T23:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the year to current year without changing the month and day?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671245#M201542</link>
      <description>So the source has a data type of date&lt;BR /&gt;Here's what I did:&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table test2 as select &lt;BR /&gt;ID&lt;BR /&gt;,mdy(month(date), day(date), 2020) AS next_dt&lt;BR /&gt;from test1&lt;BR /&gt;group by ID;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;THEN RESULT:&lt;BR /&gt;ID     next_dt (data type numeric)&lt;BR /&gt;001	22189&lt;BR /&gt;001	22156&lt;BR /&gt;&lt;BR /&gt;How do I change the data type of next_dt field to date?</description>
      <pubDate>Wed, 22 Jul 2020 00:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671245#M201542</guid>
      <dc:creator>mrafael03</dc:creator>
      <dc:date>2020-07-22T00:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the year to current year without changing the month and day?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671286#M201556</link>
      <description>&lt;P&gt;To display the values as dates, apply a date format&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mdy(month(date), day(date), 2020) as next_dt format=mmddyy10.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jul 2020 05:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-the-year-to-current-year-without-changing-the/m-p/671286#M201556</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-22T05:05:29Z</dc:date>
    </item>
  </channel>
</rss>

