<?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: Date format in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289454#M8236</link>
    <description>Thank you. Dateform=INPUT(date,MMDDYY10.); works.</description>
    <pubDate>Thu, 04 Aug 2016 08:38:25 GMT</pubDate>
    <dc:creator>Kayomole</dc:creator>
    <dc:date>2016-08-04T08:38:25Z</dc:date>
    <item>
      <title>Date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289249#M8231</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to change the date format of my data to &lt;SPAN&gt;YYMMDD8.&lt;/SPAN&gt;&amp;nbsp;. The data has two different date formats. They are:&lt;/P&gt;&lt;P&gt;1. DD/MM/YY (&lt;SPAN&gt;DDMMYY&lt;/SPAN&gt;&lt;STRONG&gt;w.)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;SPAN&gt;DD/MM/YYYY (DDMMYY10.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Usually, I&amp;nbsp;use the code below to change the date to the needed format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dateform = INPUT(PUT(date,8.),YYMMDD8.);&lt;BR /&gt;FORMAT Dateform YYMMDD8.;&lt;BR /&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the code now,&amp;nbsp;it reads the 'day' as 'year' for both date formats. Please how can I solve this problem? Thank you .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289249#M8231</guid>
      <dc:creator>Kayomole</dc:creator>
      <dc:date>2016-08-03T14:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289260#M8232</link>
      <description>&lt;P&gt;Can you clarify, you have data which is in SAS numeric date format? &amp;nbsp;If so then you just need to apply the format statement, you wouldn't input(put) it again.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289260#M8232</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-08-03T15:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289264#M8233</link>
      <description>&lt;P&gt;It is reading the DD as the YY because that is what you told it do by using the YYMMDD informat instead of the DDMMYY informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your data in a numeric variable? If so then why did you show the values as having slashes in them?&lt;/P&gt;
&lt;P&gt;Is your data in a character variable? &amp;nbsp;If so then just use the INPUT() function on it. &amp;nbsp;You should use a width of 10 to handle both the records with and without the century part of the year.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Dateform = INPUT(date,DDMMYY10.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289264#M8233</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-08-03T15:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289454#M8236</link>
      <description>Thank you. Dateform=INPUT(date,MMDDYY10.); works.</description>
      <pubDate>Thu, 04 Aug 2016 08:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format/m-p/289454#M8236</guid>
      <dc:creator>Kayomole</dc:creator>
      <dc:date>2016-08-04T08:38:25Z</dc:date>
    </item>
  </channel>
</rss>

