<?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 Change quarterly format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Change-quarterly-format/m-p/437480#M69024</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp;beginner question.&lt;/P&gt;&lt;P&gt;I have two databases in quarterly data. In one of them the variable quarterly is in format $8. (ex:&amp;nbsp;&lt;SPAN&gt;1991Q1, 1991Q2, 1991Q3 etc) and in the other is in format&amp;nbsp;DDMMYY10 (ex: 01/01/1996 is the first quarter, 01/04/1996 the second, etc).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need both variables in the same format to make a Merge by the variable in quarterly.&lt;/P&gt;&lt;P&gt;I tried that but it did not work, i get the numbers such 13149, 13240 and i don't undestand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA IPCH_trim ;
set ipch_trim ;
format trim $8. ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to change the format please?.&amp;nbsp;I&lt;SPAN&gt;deally to change the variable in&amp;nbsp;DDMMYY10&amp;nbsp; format to the format $8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks you very much&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 10:06:44 GMT</pubDate>
    <dc:creator>luciacossaro</dc:creator>
    <dc:date>2018-02-15T10:06:44Z</dc:date>
    <item>
      <title>Change quarterly format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Change-quarterly-format/m-p/437480#M69024</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp;beginner question.&lt;/P&gt;&lt;P&gt;I have two databases in quarterly data. In one of them the variable quarterly is in format $8. (ex:&amp;nbsp;&lt;SPAN&gt;1991Q1, 1991Q2, 1991Q3 etc) and in the other is in format&amp;nbsp;DDMMYY10 (ex: 01/01/1996 is the first quarter, 01/04/1996 the second, etc).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need both variables in the same format to make a Merge by the variable in quarterly.&lt;/P&gt;&lt;P&gt;I tried that but it did not work, i get the numbers such 13149, 13240 and i don't undestand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA IPCH_trim ;
set ipch_trim ;
format trim $8. ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to change the format please?.&amp;nbsp;I&lt;SPAN&gt;deally to change the variable in&amp;nbsp;DDMMYY10&amp;nbsp; format to the format $8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks you very much&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 10:06:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Change-quarterly-format/m-p/437480#M69024</guid>
      <dc:creator>luciacossaro</dc:creator>
      <dc:date>2018-02-15T10:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Change quarterly format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Change-quarterly-format/m-p/437661#M69030</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165493"&gt;@luciacossaro&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a&amp;nbsp;beginner question.&lt;/P&gt;
&lt;P&gt;I have two databases in quarterly data. In one of them the variable quarterly is in format $8. (ex:&amp;nbsp;&lt;SPAN&gt;1991Q1, 1991Q2, 1991Q3 etc) and in the other is in format&amp;nbsp;DDMMYY10 (ex: 01/01/1996 is the first quarter, 01/04/1996 the second, etc).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I need both variables in the same format to make a Merge by the variable in quarterly.&lt;/P&gt;
&lt;P&gt;I tried that but it did not work, i get the numbers such 13149, 13240 and i don't undestand why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA IPCH_trim ;
set ipch_trim ;
format trim $8. ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me to change the format please?.&amp;nbsp;I&lt;SPAN&gt;deally to change the variable in&amp;nbsp;DDMMYY10&amp;nbsp; format to the format $8.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks you very much&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I would assume that you would convert it to the quarter but it would help if you showed what the variables look like.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EIther way, use PUT to convert it to a character value, assuming a SAS date to start with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;new_value = put(date, yyq6.);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Play around with the second parameter to get what you want. Also, if you're joining via SQL you can do this on the fly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 16:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Change-quarterly-format/m-p/437661#M69030</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-15T16:05:18Z</dc:date>
    </item>
  </channel>
</rss>

