<?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: Inserting Date column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342868#M78629</link>
    <description>&lt;P&gt;Now, if you have string data in the format MM/DD/YYYY, then you can use the input() function to make a SAS date value out of it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
format date mmddyy10. ;
date = input('03/21/2017',mmddyy10.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 21 Mar 2017 08:07:56 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-03-21T08:07:56Z</dc:date>
    <item>
      <title>Inserting Date column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342835#M78620</link>
      <description>&lt;P&gt;I want to insert a date column:&lt;/P&gt;&lt;P&gt;I wrote&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want; set have;&lt;/P&gt;&lt;P&gt;format date mmddyy10. ;&lt;/P&gt;&lt;P&gt;put date '03/21/2017' ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;what mistake am i making?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 03:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342835#M78620</guid>
      <dc:creator>RandyStan</dc:creator>
      <dc:date>2017-03-21T03:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Date column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342837#M78621</link>
      <description>&lt;P&gt;You have two mistakes:&lt;/P&gt;
&lt;P&gt;1. PUT outputs the information to the log, it does not create a variable.&amp;nbsp;To create a variable assign it using the = operator.&lt;/P&gt;
&lt;P&gt;2. To assign a date value, you need to use a date literal which is of the DATE9 format, quoted, and a d follows to denote a date literal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; 
set have;
format date mmddyy10. ;
date =  '21Mar2017'd';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 03:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342837#M78621</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-21T03:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Date column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342868#M78629</link>
      <description>&lt;P&gt;Now, if you have string data in the format MM/DD/YYYY, then you can use the input() function to make a SAS date value out of it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
format date mmddyy10. ;
date = input('03/21/2017',mmddyy10.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 08:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-Date-column/m-p/342868#M78629</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-21T08:07:56Z</dc:date>
    </item>
  </channel>
</rss>

