<?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: working character and DATE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31909#M6134</link>
    <description>If interested, consider a more standard approach using the SAS-supplied DOWNAME format to get the weekday name from a SAS DATE type variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 17 Dec 2009 21:17:40 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-12-17T21:17:40Z</dc:date>
    <item>
      <title>working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31905#M6130</link>
      <description>data test;&lt;BR /&gt;
a=2;&lt;BR /&gt;
b=2;&lt;BR /&gt;
proc print data=test;&lt;BR /&gt;
run;&lt;BR /&gt;
this will give me a=2 b=2.&lt;BR /&gt;
Now I want to do same for &lt;BR /&gt;
a=m;&lt;BR /&gt;
b=a;&lt;BR /&gt;
&lt;BR /&gt;
and want to get the output a=m b=m.&lt;BR /&gt;
&lt;BR /&gt;
Can the same done with dates?&lt;BR /&gt;
&lt;BR /&gt;
how to declare the same?&lt;BR /&gt;
data test;&lt;BR /&gt;
a=12/10/2009 --&amp;gt; how to extract the weekday from a?&lt;BR /&gt;
Pl help.&lt;BR /&gt;
partha</description>
      <pubDate>Thu, 17 Dec 2009 10:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31905#M6130</guid>
      <dc:creator>HM3</dc:creator>
      <dc:date>2009-12-17T10:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31906#M6131</link>
      <description>The SAS language has date and datetime functions.  Check the DOC - suggested reading link provided below.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Concepts, About SAS Date, Time, and Datetime Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm&lt;/A&gt;</description>
      <pubDate>Thu, 17 Dec 2009 12:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31906#M6131</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-17T12:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31907#M6132</link>
      <description>&amp;gt; data test;&lt;BR /&gt;
&amp;gt; a=2;&lt;BR /&gt;
&amp;gt; b=2;&lt;BR /&gt;
&amp;gt; proc print data=test;&lt;BR /&gt;
&amp;gt; run;&lt;BR /&gt;
&amp;gt; this will give me a=2 b=2.&lt;BR /&gt;
&amp;gt; Now I want to do same for &lt;BR /&gt;
&amp;gt; a=m;&lt;BR /&gt;
&amp;gt; b=a;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; and want to get the output a=m b=m.&lt;BR /&gt;
&lt;BR /&gt;
You have to use quatition mark inorder to assign value to variable.&lt;BR /&gt;
&lt;BR /&gt;
a='m';&lt;BR /&gt;
b=a;&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; how to declare the same?&lt;BR /&gt;
&amp;gt; data test;&lt;BR /&gt;
&amp;gt; a=12/10/2009 --&amp;gt; how to extract the weekday from a?&lt;BR /&gt;
&amp;gt; Pl help.&lt;BR /&gt;
&amp;gt; partha&lt;BR /&gt;
&lt;BR /&gt;
You can use INPUT function like below.&lt;BR /&gt;
&lt;BR /&gt;
A=INPUT('12/10/2009',MMDDYY10.);</description>
      <pubDate>Thu, 17 Dec 2009 16:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31907#M6132</guid>
      <dc:creator>DPraba79</dc:creator>
      <dc:date>2009-12-17T16:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31908#M6133</link>
      <description>Partha,&lt;BR /&gt;
Are you looking for this:&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
   value whatday                                           1='Sunday'&lt;BR /&gt;
                                                                  2='Monday'&lt;BR /&gt;
				 3='Tuesday'&lt;BR /&gt;
				 4='Wednesday'&lt;BR /&gt;
				 5='Thursday'&lt;BR /&gt;
				 6='Friday'&lt;BR /&gt;
				 7='Saturday';&lt;BR /&gt;
            &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
a='12/18/2009';&lt;BR /&gt;
b=input(a,mmddyy10.);&lt;BR /&gt;
format b mmddyy10.;&lt;BR /&gt;
c=weekday(b);&lt;BR /&gt;
format c whatday.;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 17 Dec 2009 19:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31908#M6133</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-12-17T19:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31909#M6134</link>
      <description>If interested, consider a more standard approach using the SAS-supplied DOWNAME format to get the weekday name from a SAS DATE type variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 17 Dec 2009 21:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31909#M6134</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-17T21:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31910#M6135</link>
      <description>Thanks.</description>
      <pubDate>Fri, 18 Dec 2009 03:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31910#M6135</guid>
      <dc:creator>HM3</dc:creator>
      <dc:date>2009-12-18T03:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: working character and DATE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31911#M6136</link>
      <description>HM3&lt;BR /&gt;
are you talking "constants"?&lt;BR /&gt;
a=2&lt;BR /&gt;
assigns a constant to variable A.&lt;BR /&gt;
"25dec2009"d&lt;BR /&gt;
is a date constant</description>
      <pubDate>Fri, 18 Dec 2009 09:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/working-character-and-DATE/m-p/31911#M6136</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2009-12-18T09:11:03Z</dc:date>
    </item>
  </channel>
</rss>

