<?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: problem with sas code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372605#M89116</link>
    <description>please help.</description>
    <pubDate>Sun, 02 Jul 2017 18:46:26 GMT</pubDate>
    <dc:creator>atulsingh</dc:creator>
    <dc:date>2017-07-02T18:46:26Z</dc:date>
    <item>
      <title>problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372596#M89108</link>
      <description>&lt;P&gt;Here Date is a set of different dates defined in d_mtcars dataset and I am trying to find the number of days between Date and last_date. But, the values in the days column are missing as output. Please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data date_mtcars;
set character_mtcars(drop=prefix);
set d_mtcars;

last_date='29july2017';
days= intck ('day',Date,last_date);
run;

proc print data=date_mtcars;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Jul 2017 18:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372596#M89108</guid>
      <dc:creator>atulsingh</dc:creator>
      <dc:date>2017-07-02T18:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372598#M89110</link>
      <description>&lt;P&gt;Why do you have 2 SET statements? What are you expecting to happen with those two statements?&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2017 18:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372598#M89110</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-02T18:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372601#M89112</link>
      <description>&lt;P&gt;I have combined two datasets using two set statements.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2017 18:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372601#M89112</guid>
      <dc:creator>atulsingh</dc:creator>
      <dc:date>2017-07-02T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372605#M89116</link>
      <description>please help.</description>
      <pubDate>Sun, 02 Jul 2017 18:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372605#M89116</guid>
      <dc:creator>atulsingh</dc:creator>
      <dc:date>2017-07-02T18:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372610#M89118</link>
      <description>&lt;P&gt;Review how to combine data. I suspect that's your first and probably biggest issue.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p15jvywi5avt3cn1bee8r6c33ux1.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p15jvywi5avt3cn1bee8r6c33ux1.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2017 18:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372610#M89118</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-02T18:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372616#M89121</link>
      <description>&lt;P&gt;Assuming that date is actually a SAS date, your problem is likely that you defined:&lt;/P&gt;
&lt;PRE&gt;last_date='29july2017';
&lt;/PRE&gt;
&lt;P&gt;when you should have used:&lt;/P&gt;
&lt;PRE&gt;last_date='29july2017'd;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2017 19:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372616#M89121</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-02T19:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372618#M89122</link>
      <description>&lt;P&gt;Beyond to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s comment, relating to combination of datasets,&lt;/P&gt;
&lt;P&gt;you have an error defining a date literal. Change line into:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;last_date='29july2017'd;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and you can calculate days between dates just by:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;days = date - last_date;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;no need to use special function.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2017 19:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372618#M89122</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-07-02T19:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372651#M89129</link>
      <description>&lt;P&gt;data date_mtcars;&lt;BR /&gt;set character_mtcars(drop=prefix);&lt;BR /&gt;set d_mtcars;&lt;BR /&gt;last_date='29july2017'd;&lt;BR /&gt;days= intck('day',Date,last_date);&lt;BR /&gt;run;&lt;BR /&gt;proc print data=date_mtcars;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After defining date as you said, it's showing error again,&lt;/P&gt;&lt;DIV class="sasError focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;ERROR: Invalid date/time/datetime constant '29july2017'd.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 77-185: Invalid number conversion on '29july2017'd.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 05:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372651#M89129</guid>
      <dc:creator>atulsingh</dc:creator>
      <dc:date>2017-07-03T05:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372653#M89130</link>
      <description>&lt;P&gt;Other than the date does the data set appear in the correct format?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need only a 3 character month, you have the full word.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JUL vs JULY&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 06:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-sas-code/m-p/372653#M89130</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-03T06:05:51Z</dc:date>
    </item>
  </channel>
</rss>

