<?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 charachter date to sas date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591493#M169439</link>
    <description>&lt;P&gt;The lowercase "w" stands for&amp;nbsp;&lt;EM&gt;width&lt;/EM&gt; and needs to be replaced by a suitable number, in your case 10.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2019 13:04:09 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-09-25T13:04:09Z</dc:date>
    <item>
      <title>Convert charachter date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591481#M169431</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I know this is a subject on wich there is alot of forum posts already but I was not able to find a solution for my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with dates in the characther (L:10 Format:$10 Informat:$10) format "yyyy-mm-dd" and I want to transform them to a SAS numeric date, or add a new variable with the SAS numeric date. I have been trying to use the informat E8601DAw. in different ways but I may be using it wrong.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date=input(olddate, E8601DAw.);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This gives me an error on the informat E8601DAw and 0 observations.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there another informat I should use to transform the dates from characther to sas date? Should I be using a different code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be highly gratefull for any response,&lt;/P&gt;&lt;P&gt;thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 12:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591481#M169431</guid>
      <dc:creator>Viktoreli</dc:creator>
      <dc:date>2019-09-25T12:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert charachter date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591484#M169433</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cdate = '2019-02-17';
date = input(cdate,yymmdd10.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Sep 2019 12:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591484#M169433</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-25T12:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert charachter date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591485#M169434</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    olddate='2019-09-25';
    date=input(olddate, yymmdd10.);
    format date yymmdd10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Sep 2019 12:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591485#M169434</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-25T12:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert charachter date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591493#M169439</link>
      <description>&lt;P&gt;The lowercase "w" stands for&amp;nbsp;&lt;EM&gt;width&lt;/EM&gt; and needs to be replaced by a suitable number, in your case 10.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 13:04:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591493#M169439</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-09-25T13:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert charachter date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591494#M169440</link>
      <description>&lt;P&gt;lower case w in is the width specification should be number or use default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;15   data _null_;
16      olddate = '2019-09-25';
17      date=input(olddate, E8601DA.);
18      put date= date=date11.;
19      run;

date=21817 date=25-SEP-2019
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 13:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591494#M169440</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-09-25T13:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert charachter date to sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591513#M169454</link>
      <description>&lt;P&gt;Thank you very much for your response. Thanks for the info! It finally worked but had to remove&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;olddate &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'2019-09-25'&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;I really apreciate your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 13:27:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-charachter-date-to-sas-date/m-p/591513#M169454</guid>
      <dc:creator>Viktoreli</dc:creator>
      <dc:date>2019-09-25T13:27:20Z</dc:date>
    </item>
  </channel>
</rss>

