<?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: character date value to character IS8601DA. format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447516#M112442</link>
    <description>&lt;P&gt;where's the error and what error, log please. Your code seems to work fine when i ran :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data w;
STARTDATE ='29 OCT 2009';

NEWDATE=INPUT(STARTDATE,DATE11.);

FORMAT NEWDATE IS8601DA.;

RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;361 data w;&lt;BR /&gt;362 STARTDATE ='29 OCT 2009';&lt;BR /&gt;363&lt;BR /&gt;364 NEWDATE=INPUT(STARTDATE,DATE11.);&lt;BR /&gt;365&lt;BR /&gt;366 FORMAT NEWDATE IS8601DA.;&lt;BR /&gt;367&lt;BR /&gt;368 RUN;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.W has 1 observations and 2 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 17:51:48 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-03-21T17:51:48Z</dc:date>
    <item>
      <title>character date value to character IS8601DA. format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447512#M112439</link>
      <description>&lt;P&gt;&lt;STRONG&gt;How do I convert character date value (yyyy-mm-dd) to character IS8601DA format?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Example&lt;/P&gt;&lt;P&gt;STARTDATE&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NEWDATE&lt;/P&gt;&lt;P&gt;29 OCT 2009 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(I would like IS8601DA format date in this variable)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have try code as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data ab&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET cd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NEWDATE=INPUT(STARTDATE,DATE11.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FORMAT NEWDATE IS8601DA.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But this code give me error message and &amp;nbsp;no output &lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447512#M112439</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2018-03-21T17:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: character date value to character IS8601DA. format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447514#M112440</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;But this code give me error message and &amp;nbsp;no output&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's the error message? Please post your full log, including the error message.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447514#M112440</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-21T17:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: character date value to character IS8601DA. format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447515#M112441</link>
      <description>&lt;P&gt;Post the log with the error message.&amp;nbsp; Make sure to use the {i} icon on the editor menu to open a pop-up window to paste in the lines from the SAS log. This will prevent the forum editor from reflowing the lines and removing the spacing that makes them readable.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447515#M112441</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-03-21T17:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: character date value to character IS8601DA. format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447516#M112442</link>
      <description>&lt;P&gt;where's the error and what error, log please. Your code seems to work fine when i ran :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data w;
STARTDATE ='29 OCT 2009';

NEWDATE=INPUT(STARTDATE,DATE11.);

FORMAT NEWDATE IS8601DA.;

RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;361 data w;&lt;BR /&gt;362 STARTDATE ='29 OCT 2009';&lt;BR /&gt;363&lt;BR /&gt;364 NEWDATE=INPUT(STARTDATE,DATE11.);&lt;BR /&gt;365&lt;BR /&gt;366 FORMAT NEWDATE IS8601DA.;&lt;BR /&gt;367&lt;BR /&gt;368 RUN;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.W has 1 observations and 2 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447516#M112442</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-03-21T17:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: character date value to character IS8601DA. format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447595#M112483</link>
      <description>&lt;P&gt;Do you by any chance have any leading blank spaces in that character variable?&lt;/P&gt;
&lt;P&gt;See this for a brief example of what happens in that case:&lt;/P&gt;
&lt;PRE&gt;data example;
   x='29 OCT 2009';
   datex = input(x,date11.);
   /* one or more leading spaces*/
   y=' 29 OCT 2009';
   datey = input(y,date11.);
   format datex datey is8601da.;
run;
&lt;/PRE&gt;
&lt;P&gt;If that is the case for some values the use: &amp;nbsp;input(left(startdate), date11.); to remove the leading spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:57:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-date-value-to-character-IS8601DA-format/m-p/447595#M112483</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-21T20:57:18Z</dc:date>
    </item>
  </channel>
</rss>

