<?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: Best way to get to common dates in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561618#M33805</link>
    <description>&lt;P&gt;VDD, thanks. It would also be helpful to me and others if you could explain your logic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PG Stats: They are just regular dates. DateA = 01JAN2019, DateB = 27JAN2019.&lt;/P&gt;&lt;P&gt;I was hoping to do a JOIN at the format level. (i.e.) 01/2019. Didn't work. Got separate lines.&lt;/P&gt;&lt;P&gt;01/2019&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var A&lt;/P&gt;&lt;P&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/2019&amp;nbsp;&amp;nbsp;&amp;nbsp; Var B&lt;/P&gt;&lt;P&gt;I am thinking I have to turn them to a Character first ('01/2019') then the JOIN&lt;/P&gt;&lt;P&gt;would work cleanly then convert the 'Date' back to a real Date (MM/YYYY) to be able to get&lt;/P&gt;&lt;P&gt;them sorted by date.&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2019 12:55:25 GMT</pubDate>
    <dc:creator>crawfe</dc:creator>
    <dc:date>2019-05-26T12:55:25Z</dc:date>
    <item>
      <title>Best way to get to common dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561561#M33802</link>
      <description>&lt;P&gt;Hi. I use SAS EG. I have two small tables. Table A: DateA,Variable A and Table B: DateB, Variable B.&lt;/P&gt;&lt;P&gt;I would like to end up with a Joined Table: Date_MMYYYY&amp;nbsp; Var. A Var. B.&lt;/P&gt;&lt;P&gt;To do this I need to (I think) convert both DateA, DateB to a real DateMMYYYY to have a common Join point.&lt;/P&gt;&lt;P&gt;The format change is not good enough (behind the scenes, the dates are still DDMMYYY).&lt;/P&gt;&lt;P&gt;Can someone help? Thanks! ( I can only think of clumsy, long ways around).&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 14:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561561#M33802</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-05-25T14:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to get to common dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561563#M33803</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Data1;
input ID N value1;
cards;
12 1 56
12 2 45
12 3 65
25 1 87
25 2 98
25 3 23
;

data _null_;
	date1=input(put(today(),yymmdd8.),yymmdd8.);
 	my_date = intnx('month',date1,0,'s');
	call symput('my_month',put(my_date,mmyyn6.));
put date1;
put "MY date :" my_date;
	format my_date my_month mmyyn6.;
run;
data data1&amp;amp;my_month.;
	set Data1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 May 2019 14:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561563#M33803</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-05-25T14:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to get to common dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561593#M33804</link>
      <description>&lt;P&gt;To clarify what you are starting with, please run the following statements:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=A(obs=10) noobs; format _all_; run;
proc print data=B(obs=10) noobs; format _all_; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and post the results with the {i} icon.&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 22:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561593#M33804</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-25T22:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to get to common dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561618#M33805</link>
      <description>&lt;P&gt;VDD, thanks. It would also be helpful to me and others if you could explain your logic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PG Stats: They are just regular dates. DateA = 01JAN2019, DateB = 27JAN2019.&lt;/P&gt;&lt;P&gt;I was hoping to do a JOIN at the format level. (i.e.) 01/2019. Didn't work. Got separate lines.&lt;/P&gt;&lt;P&gt;01/2019&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var A&lt;/P&gt;&lt;P&gt;----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/2019&amp;nbsp;&amp;nbsp;&amp;nbsp; Var B&lt;/P&gt;&lt;P&gt;I am thinking I have to turn them to a Character first ('01/2019') then the JOIN&lt;/P&gt;&lt;P&gt;would work cleanly then convert the 'Date' back to a real Date (MM/YYYY) to be able to get&lt;/P&gt;&lt;P&gt;them sorted by date.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 12:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561618#M33805</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-05-26T12:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to get to common dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561621#M33806</link>
      <description>&lt;P&gt;use the logic and replace today() with your incoming date value from each record to create a new variable that you are requesting.&lt;/P&gt;
&lt;P&gt;If you post what you have tried and sample data rather than have us end up in left field we can assist you better.&lt;/P&gt;
&lt;P&gt;How to create a data-step version of your data&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/help/faqpage/faq-category-id/posting#posting" target="_blank"&gt;https://communities.sas.com/t5/help/faqpage/faq-category-id/posting#posting&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;How to Add attachments&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Community-Memo/Adding-attachments-to-your-communities-posts/ba-p/464767" target="_blank"&gt;https://communities.sas.com/t5/Community-Memo/Adding-attachments-to-your-communities-posts/ba-p/464767&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 15:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561621#M33806</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-05-26T15:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to get to common dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561819#M33808</link>
      <description>&lt;P&gt;No, VDD. I meant for you to explain your logic in your code.&lt;/P&gt;&lt;P&gt;Next time....&lt;/P&gt;&lt;P&gt;I simplified the logic a little; it works for the JOIN.&lt;/P&gt;&lt;P&gt;DateChar = PUT(DateA,mmyys7.)&amp;nbsp;&amp;nbsp; /* change to a character mm/yyyy */&lt;/P&gt;&lt;P&gt;BACK_toDate = INPUT(DateChar,ANYDTDTE7.) /* change back to date (num) for sorting*/&lt;/P&gt;&lt;P&gt;Format = mmyys7&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 00:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Best-way-to-get-to-common-dates/m-p/561819#M33808</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-05-28T00:41:51Z</dc:date>
    </item>
  </channel>
</rss>

