<?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: changing  dates to yes/no in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441427#M282625</link>
    <description>&lt;P&gt;Thank you so much! It worked!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Mar 2018 23:52:59 GMT</pubDate>
    <dc:creator>StefB</dc:creator>
    <dc:date>2018-03-01T23:52:59Z</dc:date>
    <item>
      <title>changing  dates to yes/no</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441415#M282623</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have imported some data into SAS and I need to change the setup in one of the variables.&amp;nbsp; The variable data is called discharge_date and for those that have a double hyphen&amp;nbsp;-- I need to put no, and those you have a date to say yes.&amp;nbsp; There are more double hyphens then dates.&amp;nbsp; Would this be an if/else statement?&amp;nbsp;&amp;nbsp;I am very new to SAS I don't know what I am doing half the time.&amp;nbsp; It is a character and the informat and format is $9.&amp;nbsp; Please help I am stumped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DISCHARGE_DATE&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;22-Nov-16&lt;/P&gt;&lt;P&gt;22-Nov-16&lt;/P&gt;&lt;P&gt;22-Nov-16&lt;/P&gt;&lt;P&gt;22-Nov-16&lt;/P&gt;&lt;P&gt;22-Nov-16&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;3-Sep-15&lt;/P&gt;&lt;P&gt;3-Sep-15&lt;/P&gt;&lt;P&gt;3-Sep-15&lt;/P&gt;&lt;P&gt;3-Sep-15&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 22:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441415#M282623</guid>
      <dc:creator>StefB</dc:creator>
      <dc:date>2018-03-01T22:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: changing  dates to yes/no</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441424#M282624</link>
      <description>&lt;P&gt;Hi, yes an if/else will do if you are sure not going to use discharge_date for later analysis. If not, you are better to code them as a date variable. Otherwise the code is a follow:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* set new var to No if discharge_date is a character and strictly coded as double hyphen:&lt;BR /&gt;* else set to Yes;
if discharge_date eq "--" then new_var="No"; else new_var="Yes";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 23:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441424#M282624</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2018-03-01T23:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: changing  dates to yes/no</title>
      <link>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441427#M282625</link>
      <description>&lt;P&gt;Thank you so much! It worked!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 23:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/changing-dates-to-yes-no/m-p/441427#M282625</guid>
      <dc:creator>StefB</dc:creator>
      <dc:date>2018-03-01T23:52:59Z</dc:date>
    </item>
  </channel>
</rss>

