<?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 convert SAS Date to mmddyy10 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876931#M346426</link>
    <description>&lt;P&gt;Please help me to convert the following SAS date to mmddyy10.&lt;/P&gt;&lt;P&gt;1955664000&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2023 17:18:53 GMT</pubDate>
    <dc:creator>Akhila1</dc:creator>
    <dc:date>2023-05-22T17:18:53Z</dc:date>
    <item>
      <title>convert SAS Date to mmddyy10</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876931#M346426</link>
      <description>&lt;P&gt;Please help me to convert the following SAS date to mmddyy10.&lt;/P&gt;&lt;P&gt;1955664000&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 17:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876931#M346426</guid>
      <dc:creator>Akhila1</dc:creator>
      <dc:date>2023-05-22T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: convert SAS Date to mmddyy10</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876963#M346433</link>
      <description>&lt;P&gt;Is that a string?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;string='1955664000';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or a number?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;number=1955664000;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If it is a number does it have any display format attached to it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What date does&amp;nbsp;&lt;SPAN&gt;1955664000 represent?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It is clearly not in YYMMDD style since there is no month number 66 in the year 1955.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it possible it is a DATETIME value (number of seconds) and not a DATE value (number of days) at all?&amp;nbsp; That number of seconds would be in the year 2021.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;129  data test;
130    number=1955664000 ;
131    put number=comma20. number :datetime19. ;
132  run;

number=1,955,664,000 21DEC2021:00:00:00
&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;If so you might want to just use the DATEPART() function to covert the number of seconds into number of days.&amp;nbsp; Then you could attach the MMDDYY10. format and it would work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also why would you want to display the date in MDY (or DMY) order?&amp;nbsp; Either choice will confuse half of your audience.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to display it in ddMONyyyy style you could use the DTDATE9. format with the existing datetime value.&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, 22 May 2023 20:07:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876963#M346433</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-22T20:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: convert SAS Date to mmddyy10</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876964#M346434</link>
      <description>&lt;P&gt;Are you sure that number is a SAS date?&amp;nbsp; It looks more like a datetime to me. As a SAS date it is 1.9 billion days after 1 Jan 1960 or 5.4 million years.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  format MyDate MyDate2 mmddyy10.;
  MyDate = datepart(1955664000);
  MyDate2 = 1955664;
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 May 2023 20:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876964#M346434</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-22T20:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: convert SAS Date to mmddyy10</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876969#M346437</link>
      <description>It is a number. Date time.</description>
      <pubDate>Mon, 22 May 2023 20:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876969#M346437</guid>
      <dc:creator>Akhila1</dc:creator>
      <dc:date>2023-05-22T20:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert SAS Date to mmddyy10</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876972#M346439</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/310572"&gt;@Akhila1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;It is a number. Date time.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Tell us specifics. What date? What time?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 21:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-SAS-Date-to-mmddyy10/m-p/876972#M346439</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-22T21:12:20Z</dc:date>
    </item>
  </channel>
</rss>

