<?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: Convert character to date9. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847267#M334991</link>
    <description>&lt;P&gt;Use INPUT() to make a new numeric variable with date values.&amp;nbsp; The YYMMN informat will recognize those strings.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date=input(period,yymmn6.);
format date date9.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Dec 2022 15:44:01 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-12-01T15:44:01Z</dc:date>
    <item>
      <title>Convert character to date9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847258#M334987</link>
      <description>&lt;P&gt;I have data of the following form:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE width="217"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;period&lt;/TD&gt;
&lt;TD width="153"&gt;some_random_number&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;202203&lt;/TD&gt;
&lt;TD&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;202204&lt;/TD&gt;
&lt;TD&gt;222&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where the period has the type: character with length 9.&lt;/P&gt;
&lt;P&gt;and I would like to convert it to date9. so that&amp;nbsp;&lt;STRONG&gt;202203&lt;/STRONG&gt; is converted to &lt;STRONG&gt;01MAR2022&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;202204&lt;/STRONG&gt; to &lt;STRONG&gt;01APR2022&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions are much appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 15:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847258#M334987</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2022-12-01T15:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert character to date9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847263#M334989</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    new_period=input(period,yymmn6.);
    format new_period date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2022 17:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847263#M334989</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-01T17:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert character to date9.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847267#M334991</link>
      <description>&lt;P&gt;Use INPUT() to make a new numeric variable with date values.&amp;nbsp; The YYMMN informat will recognize those strings.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date=input(period,yymmn6.);
format date date9.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2022 15:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-character-to-date9/m-p/847267#M334991</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-01T15:44:01Z</dc:date>
    </item>
  </channel>
</rss>

