<?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 How to convert date9. to iso8601 format ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257958#M49588</link>
    <description>&lt;P&gt;How do I convert DATE9. format to ISO8601 date format ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert the 10JAN2011 to 2011-01-10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this ?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2016 14:08:55 GMT</pubDate>
    <dc:creator>bobbyc</dc:creator>
    <dc:date>2016-03-21T14:08:55Z</dc:date>
    <item>
      <title>How to convert date9. to iso8601 format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257958#M49588</link>
      <description>&lt;P&gt;How do I convert DATE9. format to ISO8601 date format ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert the 10JAN2011 to 2011-01-10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this ?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257958#M49588</guid>
      <dc:creator>bobbyc</dc:creator>
      <dc:date>2016-03-21T14:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date9. to iso8601 format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257968#M49596</link>
      <description>&lt;P&gt;Well, that example, is not necessarily ISO date, it is YYYY-MM-DD foramt which is part of ISO. &amp;nbsp;You&amp;nbsp;would likely do it:&lt;/P&gt;
&lt;P&gt;isodate=put(your_date9_var,yymmdd10.);&lt;/P&gt;
&lt;P&gt;E.g.:&lt;/P&gt;
&lt;PRE&gt;data tmp;
  a="15FEB2015"d;
  b=put(a,yymmdd10.);
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257968#M49596</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-21T14:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert date9. to iso8601 format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257969#M49597</link>
      <description>&lt;P&gt;Formats only control the display of the variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to change the format, use a format statement. This keeps your variable as a date so that you can do calculations later on, such as duration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format variable yymmdd10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Otherwise, if you want a character variable use PUT() function as demonstrated in the other answer.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-date9-to-iso8601-format/m-p/257969#M49597</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-21T14:45:25Z</dc:date>
    </item>
  </channel>
</rss>

