<?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 Problem formatting date defined with format 'IS8601DN10' &amp;amp; informat 'DateTime20' in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227641#M41033</link>
    <description>&lt;P&gt;I am reading&amp;nbsp;dataset&amp;nbsp;in a sas program (stored process) which was created from another system.&amp;nbsp; This file&amp;nbsp;has some of the date column formats defined as&amp;nbsp; '&lt;STRONG&gt;IS8601DN10'&lt;/STRONG&gt; and informat as 'DateTime20'.&amp;nbsp;&amp;nbsp; In viewing the table, the date displays as 'YYYY-MM-DD'.&amp;nbsp;&amp;nbsp; I am trying to format the date to the format of 'mm/dd/yyyy' and I have not been&amp;nbsp;successful in doing so.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I've spend several hours on this and am quite frustrated.&amp;nbsp; Any help/suggestions would be greatly appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have never seen any data come in that used this 'IS860' type format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any help that can be offered!!!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2015 12:19:22 GMT</pubDate>
    <dc:creator>ncsthbell</dc:creator>
    <dc:date>2015-09-29T12:19:22Z</dc:date>
    <item>
      <title>Problem formatting date defined with format 'IS8601DN10' &amp; informat 'DateTime20'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227641#M41033</link>
      <description>&lt;P&gt;I am reading&amp;nbsp;dataset&amp;nbsp;in a sas program (stored process) which was created from another system.&amp;nbsp; This file&amp;nbsp;has some of the date column formats defined as&amp;nbsp; '&lt;STRONG&gt;IS8601DN10'&lt;/STRONG&gt; and informat as 'DateTime20'.&amp;nbsp;&amp;nbsp; In viewing the table, the date displays as 'YYYY-MM-DD'.&amp;nbsp;&amp;nbsp; I am trying to format the date to the format of 'mm/dd/yyyy' and I have not been&amp;nbsp;successful in doing so.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I've spend several hours on this and am quite frustrated.&amp;nbsp; Any help/suggestions would be greatly appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have never seen any data come in that used this 'IS860' type format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any help that can be offered!!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 12:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227641#M41033</guid>
      <dc:creator>ncsthbell</dc:creator>
      <dc:date>2015-09-29T12:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem formatting date defined with format 'IS8601DN10' &amp; informat 'DateTime20'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227649#M41036</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you are using the &lt;STRONG&gt;IS8601DN10&lt;/STRONG&gt; (documented as&amp;nbsp;E8601DN format), you are actually have a datetime value. So to display it using the MMDDYY. format you need to extract just the date part of the datetime value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code below illustrates this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  xDate = datetime();
  xDate2 = datepart( xDate );
  format
    xDate IS8601DN10.
    xDate2 mmddyy10.
  ;
run;

proc print data=sample ; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2015 13:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227649#M41036</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-09-29T13:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem formatting date defined with format 'IS8601DN10' &amp; informat 'DateTime20'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227797#M41082</link>
      <description>&lt;P&gt;I like Bruno's answer better than mine, since it forces you to understand what is in your data. &amp;nbsp;With that being said, you have enough to work with once you understand that expressing your variable in the IS8601DN10 format gives you YYYY-MM-DD. &amp;nbsp;Knowing just that much, you could code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;newvar = (put(oldvar, IS8601DN10.), yymmdd10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That gives you NEWVAR as a SAS date, without even knowing what is in OLDVAR. &amp;nbsp;Just add a format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;format newvar mmddyys10.;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 02:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227797#M41082</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-09-30T02:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem formatting date defined with format 'IS8601DN10' &amp; informat 'DateTime20'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227986#M41126</link>
      <description>Meant to add INPUT:&lt;BR /&gt;&lt;BR /&gt;newvar = input(put(oldvar, IS8601DN10.), yymmdd10.);</description>
      <pubDate>Thu, 01 Oct 2015 01:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-formatting-date-defined-with-format-IS8601DN10-amp/m-p/227986#M41126</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-01T01:55:22Z</dc:date>
    </item>
  </channel>
</rss>

