<?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: FORMATTING Date time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FORMATTING-Date-time/m-p/372122#M88922</link>
    <description>&lt;P&gt;If you actually would have tried &lt;U&gt;that&lt;/U&gt; code, you'd see only ERROR messages in your log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Want /* missing semicolon */
Second_Date=First_Date;
Format Second_Date MMDDYY10. /* another missing semicolon */
SET Have /* another missing semicolon */
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So you would do good in the future to post the code that you actually used.&lt;/P&gt;
&lt;P&gt;That said, you have your set statement in the wrong place:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
second_date = first_date;
format second_date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The set statement not only names a dataset for input, it also marks the place in the flow of the data step where the read will occur.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2017 12:12:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-06-30T12:12:41Z</dc:date>
    <item>
      <title>FORMATTING Date time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMATTING-Date-time/m-p/372117#M88920</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am trying to copy a column&amp;nbsp;and format it in MMDDYY10. format, but it look like the first observation on the additional column remain blank.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Want
Second_Date=First_Date;
Format Second_Date MMDDYY10.
SET Have
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;ID &amp;nbsp; &amp;nbsp; &amp;nbsp;First_Bate &amp;nbsp; &amp;nbsp; &amp;nbsp;Second_Date&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;101 &amp;nbsp; 12/26/2016 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;
&lt;P&gt;202 &amp;nbsp; 11/25/2015 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;12/26/2016&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;303 &amp;nbsp; 10/11/2014 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;11/25/2015&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;404 &amp;nbsp; &amp;nbsp;09/14/2013 &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;10/11/2014&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I will really appreciate if anyone can give me a clue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank You.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 12:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMATTING-Date-time/m-p/372117#M88920</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2017-06-30T12:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: FORMATTING Date time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMATTING-Date-time/m-p/372122#M88922</link>
      <description>&lt;P&gt;If you actually would have tried &lt;U&gt;that&lt;/U&gt; code, you'd see only ERROR messages in your log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Want /* missing semicolon */
Second_Date=First_Date;
Format Second_Date MMDDYY10. /* another missing semicolon */
SET Have /* another missing semicolon */
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So you would do good in the future to post the code that you actually used.&lt;/P&gt;
&lt;P&gt;That said, you have your set statement in the wrong place:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
second_date = first_date;
format second_date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The set statement not only names a dataset for input, it also marks the place in the flow of the data step where the read will occur.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 12:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMATTING-Date-time/m-p/372122#M88922</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-30T12:12:41Z</dc:date>
    </item>
  </channel>
</rss>

