<?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: numeric Date change the format in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891717#M39663</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Smitha9_1-1693406014732.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87306iDFFBA3A5E01487FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Smitha9_1-1693406014732.png" alt="Smitha9_1-1693406014732.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2023 14:33:42 GMT</pubDate>
    <dc:creator>Smitha9</dc:creator>
    <dc:date>2023-08-30T14:33:42Z</dc:date>
    <item>
      <title>numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891705#M39661</link>
      <description>&lt;P&gt;I have the dataset A which has Numeric Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;20120321&lt;/P&gt;&lt;P&gt;20130823&lt;/P&gt;&lt;P&gt;20220914&lt;/P&gt;&lt;P&gt;20200813&lt;/P&gt;&lt;P&gt;I want to change the format like below. And want to be the same numeric.&lt;/P&gt;&lt;P&gt;2012-03-21&lt;/P&gt;&lt;P&gt;2013-08-23&lt;/P&gt;&lt;P&gt;2022-09-14&lt;/P&gt;&lt;P&gt;2020-08-13&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in Advance&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 13:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891705#M39661</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2023-08-30T13:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891709#M39662</link>
      <description>&lt;P&gt;So, please confirm that the first dates you show, like&amp;nbsp;&lt;SPAN&gt;20120321 are numeric. Also please tell us if the variable is UN-formatted or formatted (and what is the format?)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 14:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891709#M39662</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-30T14:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891717#M39663</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Smitha9_1-1693406014732.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87306iDFFBA3A5E01487FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Smitha9_1-1693406014732.png" alt="Smitha9_1-1693406014732.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 14:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891717#M39663</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2023-08-30T14:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891722#M39664</link>
      <description>&lt;P&gt;So you don't have dates, you have mostly useless garbage which&amp;nbsp;&lt;EM&gt;looks&lt;/EM&gt; like dates, but must be converted to be properly used in analysis.&lt;/P&gt;
&lt;P&gt;You need to do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date = input(put(date,z8.),yymmdd8.);
format date yymmdd10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But you are probably better off going back to the process that brings the data into SAS and fixing it.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 14:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891722#M39664</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-30T14:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891740#M39665</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329198"&gt;@Smitha9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have the dataset A which has Numeric Date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;20120321&lt;/P&gt;
&lt;P&gt;20130823&lt;/P&gt;
&lt;P&gt;20220914&lt;/P&gt;
&lt;P&gt;20200813&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Speaking of fixing the process ...&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329198"&gt;@Smitha9&lt;/a&gt;&amp;nbsp;you are not new here, from now on please provide data as working SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;examples and instructions&lt;/A&gt;) so we don't have to ask these questions about is it formatted and what is the format. Just provide that information by providing data in the requested format, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 15:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891740#M39665</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-30T15:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891745#M39666</link>
      <description>&lt;P&gt;While the advice you have received is good, you can actually do what you asked for originally.&amp;nbsp; It's not best practice to keep dates in this form, but you can do it and change the display format by creating your own format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture mydate  1-99999999 = '9999-99-99';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then whenever printing the data, add:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format my_unspecified_date_variable_name mydate.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may need to re-create the format in any program that needs to use that format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are likely better off putting real dates into the data instead of these numbers that only look like dates but really aren't.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 16:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891745#M39666</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-08-30T16:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: numeric Date change the format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891753#M39667</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are likely better off putting real dates into the data instead of these numbers that only look like dates but really aren't.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, that's the important message here. If it is not a real date, but just looks like a date, you can't do arithmetic with it (Example: compute what date is 6 months before this date) except by inventing your own SAS code to do this (but since SAS has already done this on real dates, so you don't have to; thus use real dates).&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 17:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/numeric-Date-change-the-format/m-p/891753#M39667</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-30T17:19:13Z</dc:date>
    </item>
  </channel>
</rss>

