<?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: replacing missing date values in a  column with new date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410628#M100330</link>
    <description>Can you post the log?&lt;BR /&gt;</description>
    <pubDate>Sun, 05 Nov 2017 02:45:20 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2017-11-05T02:45:20Z</dc:date>
    <item>
      <title>replacing missing date values in a  column with new date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410625#M100327</link>
      <description>&lt;P&gt;Hello Folks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a long time reader first time Poster.&lt;/P&gt;&lt;P&gt;I'm a beginner in SAS with no programming/coding background. Currently stuck with a school assignment wherein i have to replace a missing date values in a Column (with existing mmddyy10. format)_with a given date 01/20/2001(mmddyy10.).&lt;/P&gt;&lt;P&gt;i used the following code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc format;&lt;BR /&gt;value ndate&lt;BR /&gt;. = 01/20/2001;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;proc print data=pipe_2 (obs=20);&lt;BR /&gt;FORMAT deactdt ndate.;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It replaces the missing date values with 01/20/2001, but some how the existing date values in the column converted to actual sas date values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do i retain those existing date values in their initial assigned format which is MMDDYY10 AND ALSO KEEP THE NEWW REPLACED VALUES TO MMDDYY10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YOUR response will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Have a wonderful day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 01:48:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410625#M100327</guid>
      <dc:creator>Azhar_ca</dc:creator>
      <dc:date>2017-11-05T01:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: replacing missing date values in a  column with new date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410628#M100330</link>
      <description>Can you post the log?&lt;BR /&gt;</description>
      <pubDate>Sun, 05 Nov 2017 02:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410628#M100330</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2017-11-05T02:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: replacing missing date values in a  column with new date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410630#M100331</link>
      <description>&lt;P&gt;It's not clear whether you are pursuing the proper path or not.&amp;nbsp; A format changes what prints, but doesn't change the data values themselves.&amp;nbsp; If changing the data values is the goal, you could try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data pipe_3;&lt;/P&gt;
&lt;P&gt;set pipe_2;&lt;/P&gt;
&lt;P&gt;if deactdt = . then deactdt = '20jan2001'd;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could print that data set as is, since any format applied to DEACTDT would remain unchanged.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get your original format attempt to work, you could try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;/P&gt;
&lt;P&gt;value ndate&lt;/P&gt;
&lt;P&gt;. = '01/20/2001'&lt;/P&gt;
&lt;P&gt;other = [mmddyyS10.];&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't test this until Monday, but that should work.&amp;nbsp; Note that the S in the format name indicates that the separator between parts of the date should be a slash.&amp;nbsp; (There are alternatives.)&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 02:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410630#M100331</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-05T02:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: replacing missing date values in a  column with new date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410644#M100342</link>
      <description>astounding data step fixed my problem.&lt;BR /&gt;&lt;BR /&gt;thanks a lot.&lt;BR /&gt;Have A Wonderful Day.</description>
      <pubDate>Sun, 05 Nov 2017 05:17:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-missing-date-values-in-a-column-with-new-date/m-p/410644#M100342</guid>
      <dc:creator>Azhar_ca</dc:creator>
      <dc:date>2017-11-05T05:17:55Z</dc:date>
    </item>
  </channel>
</rss>

