<?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 IF-THEN in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN/m-p/74030#M21437</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have DATE as character variable (length 9) in the dataset "now_char" and the DATE column has dates like :- 22JAN2010  . I use the code:--&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data combine;&lt;BR /&gt;
set now_char;&lt;BR /&gt;
	if DATE LT "07JAN2010" THEN		&lt;BR /&gt;
			Week = "Week1";&lt;BR /&gt;
	ELSE IF DATE GT "07/01/08" AND DATE &amp;lt;="15/01Jan/08" THEN&lt;BR /&gt;
		    Week = "Week2";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Log:-&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;
      760:16   762:21   762:43&lt;BR /&gt;
NOTE: Invalid numeric data, '27JAN2008' , at line 760 column 16.&lt;BR /&gt;
NOTE: Invalid numeric data, '26/01/08' , at line 762 column 21.&lt;BR /&gt;
NOTE: Invalid numeric data, '31/01Jan/08' , at line 762 column 43.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Kindest Regards,&lt;BR /&gt;
Kriti</description>
    <pubDate>Wed, 22 Sep 2010 19:09:39 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-09-22T19:09:39Z</dc:date>
    <item>
      <title>IF-THEN</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN/m-p/74030#M21437</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have DATE as character variable (length 9) in the dataset "now_char" and the DATE column has dates like :- 22JAN2010  . I use the code:--&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data combine;&lt;BR /&gt;
set now_char;&lt;BR /&gt;
	if DATE LT "07JAN2010" THEN		&lt;BR /&gt;
			Week = "Week1";&lt;BR /&gt;
	ELSE IF DATE GT "07/01/08" AND DATE &amp;lt;="15/01Jan/08" THEN&lt;BR /&gt;
		    Week = "Week2";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Log:-&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;
      760:16   762:21   762:43&lt;BR /&gt;
NOTE: Invalid numeric data, '27JAN2008' , at line 760 column 16.&lt;BR /&gt;
NOTE: Invalid numeric data, '26/01/08' , at line 762 column 21.&lt;BR /&gt;
NOTE: Invalid numeric data, '31/01Jan/08' , at line 762 column 43.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Kindest Regards,&lt;BR /&gt;
Kriti</description>
      <pubDate>Wed, 22 Sep 2010 19:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-THEN/m-p/74030#M21437</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-22T19:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: IF-THEN</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN/m-p/74031#M21438</link>
      <description>When comparing date values then use numeric values/variables. So you will have to transform the variable to e.g. date_num. As for the date constants look up - well - "date constants" in the online documentation.&lt;BR /&gt;
Suggested search terms: input function, date constants.</description>
      <pubDate>Wed, 22 Sep 2010 20:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-THEN/m-p/74031#M21438</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2010-09-22T20:21:39Z</dc:date>
    </item>
  </channel>
</rss>

