<?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: How to change a date in Character format to numeric format in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693321#M24993</link>
    <description>Yes, I did proc content and it is saying data variable is Char. How do I change the format after proc content?</description>
    <pubDate>Wed, 21 Oct 2020 20:55:35 GMT</pubDate>
    <dc:creator>hjjijkkl</dc:creator>
    <dc:date>2020-10-21T20:55:35Z</dc:date>
    <item>
      <title>How to change a date in Character format to numeric format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693310#M24988</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset formatted in mmddyy10. but when I run the data, it keeps on telling me its in a character format even though it looks like in numeric format. How can I fix this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I open the dataset this is what it looks like.&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;Data&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;03/20/1997&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;04/21/2002&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;05/7/2019&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 21 Oct 2020 20:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693310#M24988</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2020-10-21T20:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a date in Character format to numeric format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693318#M24990</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp; Please run a PROC CONTENTS to check whether your Date variable is numeric/char.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc contents data=your_dataset;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then do the conversion and formatting&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 20:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693318#M24990</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-21T20:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a date in Character format to numeric format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693321#M24993</link>
      <description>Yes, I did proc content and it is saying data variable is Char. How do I change the format after proc content?</description>
      <pubDate>Wed, 21 Oct 2020 20:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693321#M24993</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2020-10-21T20:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a date in Character format to numeric format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693324#M24994</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes, I did proc content and it is saying data variable is Char. How do I change the format after proc content?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Create a new data set with a new variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   newdate = input(chardate,mmddyy10.);
   format newdate mmddyy10.;
run;&lt;/PRE&gt;
&lt;P&gt;Or possibly go back to the step where where the data was read into SAS and use the mmddyy10. informat to read the value.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 21:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693324#M24994</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-21T21:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a date in Character format to numeric format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693325#M24995</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

Data dates;
input char_Date :$12.;
cards;
03/20/1997
.
04/21/2002
05/7/2019
;

data num_sas_date;
 set dates;
 num_date=input(char_Date,mmddyy10.);
 format num_date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Oct 2020 21:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-change-a-date-in-Character-format-to-numeric-format/m-p/693325#M24995</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-21T21:04:33Z</dc:date>
    </item>
  </channel>
</rss>

