<?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: Transform Date from 9 to 8 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618403#M77061</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/287480"&gt;@anweinbe&lt;/a&gt;&amp;nbsp; Here is a way to approach this kind of problem&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Verify the type of the join keys in both datasets&lt;/P&gt;
&lt;P&gt;2. If you notice a type mismatch, just convert one of the key to numeric or character depending upon the value. If it is date, you are better off keeping both as numeric.&lt;/P&gt;
&lt;P&gt;3. So look for which one of the date is char, and convert the char_date using a compatible informat i.e if ddmmmyyyy, the informat is date9.&lt;/P&gt;
&lt;P&gt;4. With the above 3 done, the JOIN becomes straight forward&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS assuming both are numeric in your sample, do not bother any conversion as those dates are mere integers and that makes a case of a straight forward join anyway&lt;/P&gt;</description>
    <pubDate>Sun, 19 Jan 2020 21:15:59 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-01-19T21:15:59Z</dc:date>
    <item>
      <title>Transform Date from 9 to 8</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618399#M77060</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've read a lot of other posts and can't seem to figure out what I am doing wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In one file I have a date that is YYMMDD8. and shows a calendar next to it. The type is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In another file I have a date that is DDFEBYYYY. It is a numeric date9, and says its a length 8.&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;P&gt;I tried the following code to transform the date 9 to the 8, but it's still not right. Now one is showing a calendar next to it and the other isn't. The join fails.&lt;/P&gt;
&lt;P&gt;Period_End1=PUT(period_end_date_num, yymmddn8.);&lt;BR /&gt;Period_End = input(Period_End1, 8.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know I'm missing something obviously simple, or I can do this is a much easier way... like convert the date 9 to a date 8? Frustrated at this point. Thank you for the help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 21:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618399#M77060</guid>
      <dc:creator>anweinbe</dc:creator>
      <dc:date>2020-01-19T21:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Date from 9 to 8</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618403#M77061</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/287480"&gt;@anweinbe&lt;/a&gt;&amp;nbsp; Here is a way to approach this kind of problem&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Verify the type of the join keys in both datasets&lt;/P&gt;
&lt;P&gt;2. If you notice a type mismatch, just convert one of the key to numeric or character depending upon the value. If it is date, you are better off keeping both as numeric.&lt;/P&gt;
&lt;P&gt;3. So look for which one of the date is char, and convert the char_date using a compatible informat i.e if ddmmmyyyy, the informat is date9.&lt;/P&gt;
&lt;P&gt;4. With the above 3 done, the JOIN becomes straight forward&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS assuming both are numeric in your sample, do not bother any conversion as those dates are mere integers and that makes a case of a straight forward join anyway&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 21:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618403#M77061</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-19T21:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Date from 9 to 8</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618404#M77062</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In one file I have a date that is YYMMDD8. and shows a calendar next to it. The type is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In another file I have a date that is DDFEBYYYY. It is a numeric date9, and says its a length 8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The thing we need to know is the format for each variable and whether it is character or numeric. The length is irrelevant. Show us a screen capture of what you see.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 19 Jan 2020 21:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618404#M77062</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-19T21:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Date from 9 to 8</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618405#M77063</link>
      <description>&lt;P&gt;I didn't need to transform anything sheesh! I thought because one was 8 and one was 9 they wouldn't work! All that time for nothing. At least I learned something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you Paige!&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 21:31:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Transform-Date-from-9-to-8/m-p/618405#M77063</guid>
      <dc:creator>anweinbe</dc:creator>
      <dc:date>2020-01-19T21:31:57Z</dc:date>
    </item>
  </channel>
</rss>

