<?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 Help with date formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939780#M368960</link>
    <description>&lt;P&gt;I am trying to convert a date currently in character form to correct format, but my code is changing the date. Could anyone please point out what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mthyr_birth (existing data)&lt;/P&gt;&lt;P&gt;Jun2001&lt;/P&gt;&lt;P&gt;Feb1954&lt;/P&gt;&lt;P&gt;Feb1984&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;mthyr_birth2 = input(mthyr_birth, MONYY.);&lt;/P&gt;&lt;P&gt;format mthyr_birth2 MONYY.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mthyr_birth2 (output)&lt;/P&gt;&lt;P&gt;JUN20&lt;/P&gt;&lt;P&gt;FEB19&lt;/P&gt;&lt;P&gt;FEB19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2024 11:28:50 GMT</pubDate>
    <dc:creator>timmy94</dc:creator>
    <dc:date>2024-08-18T11:28:50Z</dc:date>
    <item>
      <title>Help with date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939780#M368960</link>
      <description>&lt;P&gt;I am trying to convert a date currently in character form to correct format, but my code is changing the date. Could anyone please point out what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mthyr_birth (existing data)&lt;/P&gt;&lt;P&gt;Jun2001&lt;/P&gt;&lt;P&gt;Feb1954&lt;/P&gt;&lt;P&gt;Feb1984&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;mthyr_birth2 = input(mthyr_birth, MONYY.);&lt;/P&gt;&lt;P&gt;format mthyr_birth2 MONYY.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mthyr_birth2 (output)&lt;/P&gt;&lt;P&gt;JUN20&lt;/P&gt;&lt;P&gt;FEB19&lt;/P&gt;&lt;P&gt;FEB19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2024 11:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939780#M368960</guid>
      <dc:creator>timmy94</dc:creator>
      <dc:date>2024-08-18T11:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939781#M368961</link>
      <description>&lt;P&gt;By default, the MONYY uses a width of 5.&amp;nbsp; So the INPUT function is reading only 5 characters.&amp;nbsp; Your data has 7 characters in it, so change MONYY to MONYY7 and you should see better results.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2024 12:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939781#M368961</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2024-08-18T12:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939888#M368988</link>
      <description>Thanks so much! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 19 Aug 2024 14:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-date-formats/m-p/939888#M368988</guid>
      <dc:creator>timmy94</dc:creator>
      <dc:date>2024-08-19T14:10:32Z</dc:date>
    </item>
  </channel>
</rss>

