<?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: Date comparison in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587301#M14656</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270435"&gt;@jorquec&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The source table which contain this variable show me that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;max(month_end_dt) as maxmargin_dt&amp;nbsp; is a column on a &lt;STRONG&gt;date format.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I don't understand why the comparison is not working. Could you please give me some help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Comparisons with literal dates require the value to be in quotes with a trailing D to indicate the value is a date:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mydatevariable ge '01Jan2019'd&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example.&lt;/P&gt;
&lt;P&gt;Similarly times are end in t&amp;nbsp;&amp;nbsp; "12:15:30"t and datetimes in dt&amp;nbsp;&amp;nbsp; '01Jan2019:12:15:30'dt.&lt;/P&gt;
&lt;P&gt;Single or double quotes and upper or lowercase are acceptable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2019 16:38:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-09-09T16:38:09Z</dc:date>
    <item>
      <title>Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/586797#M14573</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone give some help?&lt;/P&gt;&lt;P&gt;I guess this piece of code is not correct to compare data I guess is that they are in different formats.&lt;/P&gt;&lt;P&gt;The fisrt step generates a table with this results&amp;nbsp;&lt;/P&gt;&lt;P&gt;a.maxmargin_dt = 31JUL2019&amp;nbsp; and&amp;nbsp; b.maxmodelmart_d= 355&lt;/P&gt;&lt;P&gt;And macro data generates&amp;nbsp;&amp;nbsp;ONEDT2 = 1190831 and&amp;nbsp;&amp;nbsp;month_id = 356&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF (maxmargin_dt &amp;gt;(&amp;amp;ONEDT2.)/100 ) and (maxmodelmart_d &amp;lt;&amp;gt; &amp;amp;month_id.) then export_flag='Y'; else export_flag='N';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should result in&amp;nbsp;export_flag = N because only&amp;nbsp; the second&amp;nbsp; conditions is true&amp;nbsp; , however it results me as Y , so I guess despite of I had use&amp;nbsp;&amp;nbsp;(maxmargin_dt &amp;gt;(&amp;amp;ONEDT2.)/100 ) this&amp;nbsp; converstion it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be apprecciate I am not an expert in date and I have to use macro data functions because this is an automatic&amp;nbsp; routine process.&lt;/P&gt;&lt;P&gt;Kindly regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%let today=%sysfunc(today());
%let currdt=%sysfunc(datetime());

data _null_;

date2=intnx("month",&amp;amp;today.,-1,'end');
call symput('ONEDT2',"1"||substr(put(date2,DDMMYYN.),7,2)||substr(put(date2,DDMMYYN.),3,2)||substr(put(date2,DDMMYYN.),1,2));
%put &amp;amp;ONEDT2.;
%put ONEDT2=&amp;amp;ONEDT2.;


month_id = intck('month','01jan1990'd,today());
put month_id=;
call symputx('month_id',month_id);
%put month_id=&amp;amp;month_id.;

run;

/*STEP 1 */
proc sql;
 drop table IRM.TESTPAYG;
quit;

Proc SQL;
connect to teradata 
(user=&amp;amp;teradata_user. password=&amp;amp;teradata_pwd. server = 'edwprod' database = 'nuc_pl_user_view');  
Create  table IRM.TESTPAYG as select * from connection to teradata(

 select a.ID,  a.maxmargin_dt, b.maxmodelmart_d from 
(  
  select  
			1 as ID,
 			max(month_end_dt) as maxmargin_dt
from nuc_pl_user_view.pg_margin_stack) as A
left join (
select  
			1 as ID,
			max(month_id) as maxmodelmart_d
 from  Insights_rm.Consumer_Model_Mart) as B
on a.ID = b.ID

 );
disconnect from teradata ;
QUIT;

/* STEP 2 */

proc sql;
 drop table IRM.TESTPAYG2;
quit;

DATA IRM.TESTPAYG2;
SET IRM.TESTPAYG;
IF  (maxmargin_dt &amp;gt;(&amp;amp;ONEDT2.)/100 ) and (maxmodelmart_d &amp;lt;&amp;gt; &amp;amp;month_id.) then export_flag='Y'; 

else export_flag='N';

call symputx('export_flag', export_flag);

run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Sep 2019 15:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/586797#M14573</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-06T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/586818#M14585</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270435"&gt;@jorquec&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone give some help?&lt;/P&gt;
&lt;P&gt;I guess this piece of code is not correct to compare data I guess is that they are in different formats.&lt;/P&gt;
&lt;P&gt;The fisrt step generates a table with this results&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a.maxmargin_dt = 31JUL2019&amp;nbsp; and&amp;nbsp; b.maxmodelmart_d= 355&lt;/P&gt;
&lt;P&gt;And macro data generates&amp;nbsp;&amp;nbsp;ONEDT2 = 1190831 and&amp;nbsp;&amp;nbsp;month_id = 356&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF (maxmargin_dt &amp;gt;(&amp;amp;ONEDT2.)/100 ) and (maxmodelmart_d &amp;lt;&amp;gt; &amp;amp;month_id.) then export_flag='Y'; else export_flag='N';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should result in&amp;nbsp;export_flag = N because only&amp;nbsp; the second&amp;nbsp; conditions is true&amp;nbsp; , however it results me as Y , so I guess despite of I had use&amp;nbsp;&amp;nbsp;(maxmargin_dt &amp;gt;(&amp;amp;ONEDT2.)/100 ) this&amp;nbsp; converstion it is not working.&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is maxmargin_dt the text sting 31JUL2019 ??? Or does it contain a numeric value which is formatted to appear as 31JUL2019.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it character or numeric. Please look this up and let us know.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 16:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/586818#M14585</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-06T16:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587160#M14618</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The source table which contain this variable show me that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;max(month_end_dt) as maxmargin_dt&amp;nbsp; is a column on a &lt;STRONG&gt;date format.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I don't understand why the comparison is not working. Could you please give me some help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 08:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587160#M14618</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-09T08:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587301#M14656</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270435"&gt;@jorquec&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The source table which contain this variable show me that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;max(month_end_dt) as maxmargin_dt&amp;nbsp; is a column on a &lt;STRONG&gt;date format.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I don't understand why the comparison is not working. Could you please give me some help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Comparisons with literal dates require the value to be in quotes with a trailing D to indicate the value is a date:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mydatevariable ge '01Jan2019'd&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example.&lt;/P&gt;
&lt;P&gt;Similarly times are end in t&amp;nbsp;&amp;nbsp; "12:15:30"t and datetimes in dt&amp;nbsp;&amp;nbsp; '01Jan2019:12:15:30'dt.&lt;/P&gt;
&lt;P&gt;Single or double quotes and upper or lowercase are acceptable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 16:38:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587301#M14656</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-09T16:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587302#M14657</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270435"&gt;@jorquec&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The source table which contain this variable show me that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;max(month_end_dt) as maxmargin_dt&amp;nbsp; is a column on a &lt;STRONG&gt;date format.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I don't understand why the comparison is not working. Could you please give me some help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Be specific. What exact date format?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 16:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587302#M14657</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-09T16:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587306#M14659</link>
      <description>&lt;P&gt;Sorry the owner table just said to me that it is a DATE , I have check some and it shows me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;30/06/2019&lt;/P&gt;&lt;P&gt;31/12/2014&lt;/P&gt;&lt;P&gt;30/05/2015&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 17:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587306#M14659</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-09T17:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587307#M14660</link>
      <description>&lt;P&gt;I have made a print screen and it shows me :&lt;/P&gt;&lt;P&gt;30/06/2019&lt;/P&gt;&lt;P&gt;30/05/2019&lt;/P&gt;&lt;P&gt;31/12/2014&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 16:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587307#M14660</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-09T16:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587309#M14662</link>
      <description>&lt;P&gt;And how do you know these are really numbers formatted to look like 30/06/2019? How do you know these are not character strings? Please look at the PROC CONTENTS of the data set&amp;nbsp;IRM.TESTPAYG2 to see if it is numeric or character, and what the exact format is, so that we get exact information, instead of this guessing?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 17:06:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587309#M14662</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-09T17:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587450#M14688</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help. Please see attached proc contents with formats.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 08:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587450#M14688</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-10T08:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587479#M14693</link>
      <description>&lt;P&gt;Some of us (including me) will not or cannot download and open Excel files (or other Microsoft Office documents) because they are a security threat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please copy the PROC CONTENTS output &lt;STRONG&gt;as text&lt;/STRONG&gt;, and paste it into the window that appears when you click on the {i} icon. This preserves the formatting of the output and makes it much more readable and understandable.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 12:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587479#M14693</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-10T12:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587482#M14694</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;The&amp;nbsp;CONTENTS&amp;nbsp;Procedure						
Data Set Name	IRM.TESTPAYG2	Observations	.			
Member Type	DATA	Variables	4			
Engine	TERADATA	Indexes	0			
Created	.	Observation Length	0			
Last Modified	.	Deleted Observations	0			
Protection		Compressed	NO			
Data Set Type		Sorted	NO			
Label						
Data Representation	Default					
Encoding	Default					
Alphabetic List of Variables and Attributes						
#	Variable	Type	Len	Format	Informat	Label
1	ID	Num	8	6	6	ID
4	export_flag	Char	1	$1.	$1.	export_flag
2	maxmargin_dt	Num	8	DATE9.	DATE9.	maxmargin_dt
3	maxmodelmart_d	Num	8	12	12	maxmodelmart_d&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope you can see this way, sorry I didn't know about restriction on&amp;nbsp; attachments.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 12:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587482#M14694</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-10T12:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587486#M14695</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symput('ONEDT2',"1"||substr(put(date2,DDMMYYN.),7,2)||substr(put(date2,DDMMYYN.),3,2)||substr(put(date2,DDMMYYN.),1,2));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't know what this is supposed to do, or why you need the "1" at the beginning of the string, but this does NOT create a SAS date value. Nevertheless, later when you want to compare &amp;amp;ONEDT2 (which is not a SAS date) to a SAS date in this line&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IF  (maxmargin_dt &amp;gt;(&amp;amp;ONEDT2.)/100 )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the comparison will fail, this is not a meaningful comparison to compare MAXMARGIN_DT (which is a SAS date) with &amp;amp;ONEDT/100 which is not a SAS date (and why divide by 100?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to compare the dates, then you need a SAS date value (or the equivalent integer), followed by "&amp;gt;" followed by another SAS date value (or the equivalent integer).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, in your DATA _NULL_ step, use this to create a macro variable named &amp;amp;DATE2 based upon the value of data set variable date2. This is a valid SAS date value, because that's how it was created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx('date2',date2);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then later in your code, use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IF  (maxmargin_dt &amp;gt; &amp;amp;date2 ) ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 12:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587486#M14695</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-10T12:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587495#M14697</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your code I am testing but I would like to know if there is a way to see date2 in another format just to check&amp;nbsp; in put statement, because I can not understand&amp;nbsp; "21792 "&amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;35&lt;BR /&gt;36 date2=intnx("month",&amp;amp;today.,-1,'end');&lt;BR /&gt;37 call symputx('date2',date2);&lt;BR /&gt;38 %put date2=&amp;amp;date2.;&lt;BR /&gt;date2=21792&lt;BR /&gt;39&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587495#M14697</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-10T13:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587499#M14699</link>
      <description>&lt;P&gt;SAS date values are integers, representing the number of days since January 1, 1960.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see what 21792 represents, try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;=date2;
%put DATE2 = %sysfunc(putn(&amp;amp;date2,date9.));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587499#M14699</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-10T13:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date comparison</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587504#M14701</link>
      <description>&lt;P&gt;Hi PaigeMiller&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your patience , for your help.&amp;nbsp; You are absolutely great !!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my basic knowledge some of code that I share were not written by me so I just received a lot of old stuffs and I am trying to do my best&amp;nbsp; which is really hard sometimes as a beginner.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again many many thanks.&lt;/P&gt;&lt;P&gt;Kindly regards.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 13:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-comparison/m-p/587504#M14701</guid>
      <dc:creator>jorquec</dc:creator>
      <dc:date>2019-09-10T13:22:24Z</dc:date>
    </item>
  </channel>
</rss>

