<?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: Running Program For The last 45 days in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514115#M2649</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let startdate = "%sysfunc(putn(%eval(%sysfunc(today())-45),yymmdd10.))";
%let enddate = "%sysfunc(today(),yymmdd10.)";

%put &amp;amp;startdate &amp;amp;enddate;

%let start_dt ="%sysfunc(putn(%eval(%sysfunc(today())-45),date9.)):00:00:00"dt;
%let end_dt = "%sysfunc(today(),date9.):00:00:00"dt; 

%put &amp;amp;start_dt &amp;amp;end_dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 17 Nov 2018 10:37:52 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-11-17T10:37:52Z</dc:date>
    <item>
      <title>Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514037#M2631</link>
      <description>&lt;P&gt;I currently have a program that I am running that I manually input the start date and end date with a variable I create at the beginning of the code. I would like to avoid doing this in the future, and instead create a date variable that would detect the current date, and run the program with a date that is 45 days in the past.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice on how to proceed would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the current date variable that I declare:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let startdate = '2018-09-23';
%let enddate = '2018-11-01';

%let start_dt = '23sep2018:00:00:00'dt;
%let end_dt = '01nov2018:00:00:00'dt; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you very much for your time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 19:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514037#M2631</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-16T19:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514046#M2634</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	sdt=put(today(),yymmdd10.);
	edt=put(intnx('days',today(),45),yymmdd10.);

	s_dt=cats(put(today(),date9.),':00:00:00');
	e_dt=cats(put(intnx('days',today(),45),date9.),':00:00:00');

	call symputx('sdt',quote(strip(sdt)));
	call symputx('edt',quote(strip(edt)));
	call symputx('s_dt',strip(s_dt));
	call symputx('e_dt',strip(e_dt));

run;

%put &amp;amp;=sdt &amp;amp;=edt &amp;amp;=s_dt &amp;amp;=e_dt;


%let startdate = &amp;amp;sdt;
%let enddate = &amp;amp;edt;

%let start_dt = "&amp;amp;s_dt"dt;
%let end_dt = "&amp;amp;e_dt"dt; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Nov 2018 20:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514046#M2634</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-16T20:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514048#M2635</link>
      <description>&lt;P&gt;Slightly Modified Version :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	sdt=put(today(),yymmdd10.);
	edt=put(intnx('days',today(),45),yymmdd10.);

	s_dt=cats(put(today(),date9.),':00:00:00');
	e_dt=cats(put(intnx('days',today(),45),date9.),':00:00:00');

	call symputx('startdate',quote(strip(sdt)));
	call symputx('enddate ',quote(strip(edt)));
	call symputx('s_dt',strip(s_dt));
	call symputx('e_dt',strip(e_dt));

run;

%put &amp;amp;=startdate &amp;amp;=enddate &amp;amp;=s_dt &amp;amp;=e_dt;

%let start_dt = "&amp;amp;s_dt"dt;
%let end_dt = "&amp;amp;e_dt"dt; 

%put &amp;amp;=start_dt  &amp;amp;=end_dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Nov 2018 20:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514048#M2635</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-16T20:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514115#M2649</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let startdate = "%sysfunc(putn(%eval(%sysfunc(today())-45),yymmdd10.))";
%let enddate = "%sysfunc(today(),yymmdd10.)";

%put &amp;amp;startdate &amp;amp;enddate;

%let start_dt ="%sysfunc(putn(%eval(%sysfunc(today())-45),date9.)):00:00:00"dt;
%let end_dt = "%sysfunc(today(),date9.):00:00:00"dt; 

%put &amp;amp;start_dt &amp;amp;end_dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Nov 2018 10:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514115#M2649</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-11-17T10:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514135#M2658</link>
      <description>&lt;P&gt;It is probably a lot easy to play with getting the date and datetime value in a data step.&amp;nbsp; You can then use CALL SYMPUTX() to generate your macro variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  end=today();
  start=end-45 ;
  end_dt=dhms(end,0,0,0);
  start_dt=dhms(start,0,0,0);
  put (start end) (= yymmdd10.) (start_dt end_dt) (= datetime19.);
  call symputx('startdate',quote(put(start,yymmdd10.),"'"));
  call symputx('enddate',quote(put(end,yymmdd10.),"'"));
  call symputx('start_dt',quote(cats(put(start_dt,datetime19.)))||'dt');
  call symputx('end_dt',quote(cats(put(end_dt,datetime19.)))||'dt');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;PRE&gt;start=2018-10-03 end=2018-11-17 start_dt=03OCT2018:00:00:00 end_dt=17NOV2018:00:00:00

555  %put &amp;amp;=startdate;
STARTDATE='2018-10-03'
556  %put &amp;amp;=enddate;
ENDDATE='2018-11-17'
557  %put &amp;amp;=start_dt;
START_DT="03OCT2018:00:00:00"dt
558  %put &amp;amp;=end_dt;
END_DT="17NOV2018:00:00:00"dt&lt;/PRE&gt;
&lt;P&gt;Note that if you are going to use those date or datetime values in SAS code then there is no need to format them in human friendly ways.&amp;nbsp; You can just use the underlying integer values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  call symputx('startdate_easy',start);
  call symputx('enddate_easy',end);
  call symputx('start_dt_easy',start_dt);
  call symputx('end_dt_easy',end_dt);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;560  %put &amp;amp;=startdate_easy;
STARTDATE_EASY=21460
561  %put &amp;amp;=enddate_easy;
ENDDATE_EASY=21505
562  %put &amp;amp;=start_dt_easy ;
START_DT_EASY=1854144000
563  %put &amp;amp;=end_dt_easy ;
END_DT_EASY=1858032000&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Nov 2018 16:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/514135#M2658</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-17T16:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516111#M3070</link>
      <description>&lt;P&gt;I switched over to what you have below and it appears to be causing errors now. One of the error&amp;nbsp;states "CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '2018-11-26'. : [Microsoft][ODBC SQL&lt;BR /&gt;Server Driver][SQL Server]Invalid column name '2019-01-10'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s)&lt;BR /&gt;could not be prepared."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it has something to do with the way the date is formatted. Could you help me understand how to fix this?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 20:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516111#M3070</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-26T20:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516113#M3072</link>
      <description>&lt;P&gt;Please post your SQL Query.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 20:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516113#M3072</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-26T20:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516114#M3073</link>
      <description>&lt;P&gt;From the error message the database SQL parser thinks that by&amp;nbsp;&lt;SPAN&gt;'2018-11-26' you are trying to refer to a variable instead of a constant value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show the actual code you submitted.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 20:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516114#M3073</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-26T20:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516119#M3076</link>
      <description>&lt;P&gt;Here is the Proc Sql.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
CONNECT TO odbc as myconn (noprompt="server=canldsassqlrpt;DRIVER=SQL Server;Trusted_Connection=yes;database=customerScoring");

CREATE TABLE TUnionLD AS 
 select *
 from connection to myconn
 (
 SELECT AD.AGENCY_DATA_KEY AS api_call,
 AD.DATE_ENTERED AS api_datetime
 FROM CUSTOMERSCORING.DBO.AGENCYDATA AD
 WHERE AD.AGENCY_MASTER_KEY in (68) AND AD.DATA_ERROR = 0 AND
 AD.DATE_ENTERED &amp;gt;= &amp;amp;startdate. AND AD.DATE_ENTERED &amp;lt; &amp;amp;enddate.

 )
 ;
disconnect from myconn;
quit;

proc sql;
create table TULD as
 select datepart(api_datetime) as api_date format yymmdd10., 
 count(distinct api_call) as Count format comma20.
 from TUnionLD
 group by api_date
 ;
quit;

data TUCreditLDDS;
 set TULD;
 length mid $15 product $30 vendor $30;
 vendor = 'TransUnion';
 mid = '0720F2002474';
 product = 'Credit Report';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;In case you need this, here is a screenshot of what the data looks like in SQL&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-11-26 14_53_21-devsvr02 - Remote Desktop Connection.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25177iE629C477B9670FD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="2018-11-26 14_53_21-devsvr02 - Remote Desktop Connection.png" alt="2018-11-26 14_53_21-devsvr02 - Remote Desktop Connection.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 21:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516119#M3076</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-26T21:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516126#M3078</link>
      <description>&lt;P&gt;Could you post this section of the log as well.&amp;nbsp;Want to see the resolved values of the macro variables.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 21:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516126#M3078</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-26T21:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516129#M3079</link>
      <description>&lt;P&gt;Here is the Log Summary:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-11-26 15_06_49-ictsassvr01 - Remote Desktop Connection.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25181i8148360D03C5A2DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="2018-11-26 15_06_49-ictsassvr01 - Remote Desktop Connection.png" alt="2018-11-26 15_06_49-ictsassvr01 - Remote Desktop Connection.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the information in the Log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; GOPTIONS ACCESSIBLE;
23         proc sql;
24         CONNECT TO odbc as myconn
24       ! (noprompt=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX);
25         
26         CREATE TABLE TUnionLD AS
27             select *
28             from connection to myconn
29              (
30                    SELECT  AD.AGENCY_DATA_KEY AS api_call,
31                            AD.DATE_ENTERED AS api_datetime
32                    FROM CUSTOMERSCORING.DBO.AGENCYDATA AD
33                    WHERE AD.AGENCY_MASTER_KEY in (68) AND AD.DATA_ERROR = 0 AND
34                         AD.DATE_ENTERED &amp;gt;= &amp;amp;startdate. AND AD.DATE_ENTERED &amp;lt; &amp;amp;enddate.
35         
36                         )
37              ;
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '2018-11-26'. : [Microsoft][ODBC SQL 
       Server Driver][SQL Server]Invalid column name '2018-10-12'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) 
       could not be prepared.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
38         disconnect from myconn;
NOTE: Statement not executed due to NOEXEC option.
39         quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.05 seconds
      cpu time            0.00 seconds
      


40         proc sql;
41         create table TULD as
42           select datepart(api_datetime) as api_date format yymmdd10.,
43                    count(distinct api_call) as Count format comma20.
44           from  TUnionLD
2                                                          The SAS System                            13:07 Monday, November 26, 2018

45           group by api_date
46           ;
ERROR: Function DATEPART requires a numeric expression as argument 1.
ERROR: Character expression requires a character format.
ERROR: The following columns were not found in the contributing tables: api_call, api_datetime.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 21:08:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516129#M3079</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-26T21:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516151#M3084</link>
      <description>&lt;P&gt;The SQL Pass-thru query is expecting to have values for startdate and enddate. Ideally the startdate and&amp;nbsp;&lt;SPAN&gt;enddate should resolve with the quotes around them for example as&amp;nbsp; '2018-08-01 00:00:00' and&amp;nbsp;'2018-11-26 00:00:00' .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;From the Log it is very difficult to say if this is the case. I suspect that though the macro variables are resolved they are resolved without the quotes '' around so SQL server is treating them as columns instead as constants.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;enable the below option an try again to see more details in the log.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options symbolgen;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 21:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516151#M3084</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-26T21:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516153#M3086</link>
      <description>&lt;P&gt;I ran the code with the options you suggested, and here is the log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;26         CREATE TABLE TUnionLD AS
27             select *
28             from connection to myconn
29              (
30                    SELECT  AD.AGENCY_DATA_KEY AS api_call,
31                            AD.DATE_ENTERED AS api_datetime
32                    FROM CUSTOMERSCORING.DBO.AGENCYDATA AD
33                    WHERE AD.AGENCY_MASTER_KEY in (68) AND AD.DATA_ERROR = 0 AND
34                         AD.DATE_ENTERED
SYMBOLGEN:  Macro variable STARTDATE resolves to "2018-11-26"
34       !                                 &amp;gt;= &amp;amp;startdate. AND AD.DATE_ENTERED &amp;lt; &amp;amp;enddate.
SYMBOLGEN:  Macro variable ENDDATE resolves to "2018-10-12"
35         
36                         )
37              ;
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '2018-11-26'. : [Microsoft][ODBC SQL 
       Server Driver][SQL Server]Invalid column name '2018-10-12'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) 
       could not be prepared.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
38         disconnect from myconn;
NOTE: Statement not executed due to NOEXEC option.
39         quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.08 seconds
      cpu time            0.00 seconds
      


40         proc sql;
2                                                          The SAS System                            13:07 Monday, November 26, 2018

41         create table TULD as
42           select datepart(api_datetime) as api_date format yymmdd10.,
43                    count(distinct api_call) as Count format comma20.
44           from  TUnionLD
45           group by api_date
46           ;
ERROR: Function DATEPART requires a numeric expression as argument 1.
ERROR: Character expression requires a character format.
ERROR: The following columns were not found in the contributing tables: api_call, api_datetime.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
47         quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 21:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516153#M3086</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-26T21:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516158#M3090</link>
      <description>&lt;P&gt;I am not a SQL Server expert but I think the way it treats the date constant in a double quote and single quote and without quote&amp;nbsp; differently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try doing this and see if it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	sdt=put(today(),yymmdd10.);
	edt=put(intnx('days',today(),45),yymmdd10.);

	s_dt=cats(put(today(),date9.),':00:00:00');
	e_dt=cats(put(intnx('days',today(),45),date9.),':00:00:00');

	call symputx('startdate',cats("'",strip(sdt),"'"));
	call symputx('enddate ',cats("'",strip(edt),"'"));
	call symputx('s_dt',cats("'",strip(s_dt),"'"));
	call symputx('e_dt',cats("'",strip(e_dt),"'"));

run;

%put &amp;amp;=startdate &amp;amp;=enddate &amp;amp;=s_dt &amp;amp;=e_dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 21:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516158#M3090</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-26T21:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516162#M3092</link>
      <description>I appreciate your help with this Behata. I re ran the code with your edits about, but it's still not functioning the way that we need it to unfortunately. When I review the data sets created, there are no observations in them at all.</description>
      <pubDate>Mon, 26 Nov 2018 22:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516162#M3092</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-26T22:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running Program For The last 45 days</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516163#M3093</link>
      <description>I submitted the code, and the log messages above. Would you mind taking a look when you have a moment?</description>
      <pubDate>Mon, 26 Nov 2018 22:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Running-Program-For-The-last-45-days/m-p/516163#M3093</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2018-11-26T22:01:00Z</dc:date>
    </item>
  </channel>
</rss>

