<?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 Format for Quarters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493710#M129926</link>
    <description>&lt;P&gt;Post anything you’ve tried and we’d be happy to help. You likely want a PICTURE Format. See this paper, specifically pg 14.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose a link would have helped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT:&amp;nbsp;&lt;A href="http://www2.sas.com/proceedings/sugi31/243-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/243-31.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    picture QNYYYY (default=12) low-high='%q%Y' (datatype=date);
run;

data have;
    date='01Jan2018'd;
    date_f1=catt('Q', put(qtr(date), 1.), put(year(date), 4.));
    date_f2=put(date, QNYYYY.);
    date_f3=date;
    format date date9. date_f3 QNYYYY.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Sep 2018 02:48:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-09-08T02:48:35Z</dc:date>
    <item>
      <title>Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493683#M129912</link>
      <description>&lt;P&gt;Hi community -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would someone be willing to help me create a date format that outputs a sas date of 21185 as "Q12018" rather than the 2018Q1 I get with the YYQ format?&amp;nbsp; I need it to start with the character value&amp;nbsp;because I want to use it as a variable.&amp;nbsp; I cannot find a format like this and I have no experience creating formats.&amp;nbsp; my practice efforts after reading loads of documentation have all been fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;wendy&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>Fri, 07 Sep 2018 23:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493683#M129912</guid>
      <dc:creator>wendy0327</dc:creator>
      <dc:date>2018-09-07T23:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493710#M129926</link>
      <description>&lt;P&gt;Post anything you’ve tried and we’d be happy to help. You likely want a PICTURE Format. See this paper, specifically pg 14.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose a link would have helped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT:&amp;nbsp;&lt;A href="http://www2.sas.com/proceedings/sugi31/243-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/243-31.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    picture QNYYYY (default=12) low-high='%q%Y' (datatype=date);
run;

data have;
    date='01Jan2018'd;
    date_f1=catt('Q', put(qtr(date), 1.), put(year(date), 4.));
    date_f2=put(date, QNYYYY.);
    date_f3=date;
    format date date9. date_f3 QNYYYY.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 02:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493710#M129926</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-08T02:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493716#M129931</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;No link...&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 02:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/493716#M129931</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-09-08T02:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494147#M130171</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;Hi - &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;thank you for your response!&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;the following code works to put the date into the format I need.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;I had attempted this earlier, and kept getting an error I could not resolve.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;date_f1&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;catt&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Q'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;qtr&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;date&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;year&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;date&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;4&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;now, my issue is to use that process in the following code.&amp;nbsp; "filedate" is a sas date that is on my incoming dataset.&amp;nbsp; the objective is to re-label 7 quarters of wage data (labeled wage1, wage2, etc) with the name of the quarter it represents.&amp;nbsp; the data is for 7 consecutive quarters, so I'm looking to rename 7 variables.&amp;nbsp; the file (and thus the filedate and the variable names) update quarterly.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;my code below would work except yyq. (and all the other qtr formats) start with a number value (2018-1) and thus can't be used as a variable name.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;I am open to ANY easy workaround.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_1"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(filedate, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_3"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_4"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_5"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_6"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"wage_7"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 14:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494147#M130171</guid>
      <dc:creator>wendy0327</dc:creator>
      <dc:date>2018-09-10T14:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494150#M130173</link>
      <description>&lt;P&gt;I'm confused. Your formula will work but you have to apply it to each variable, which is why a SAS date format is more appropriate. My code above illustrates using the custom fomrat. If you replace your format below, YYQ with the format I created it should be what you want. I would also switch that to an array so your code is simpler and it's easier to adjust to more time periods. .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also suggest modifying the structure of your data so you don't have to deal with X variables. Dealing with data in a long format is simpler in the long run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/157940"&gt;@wendy0327&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;Hi - &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;thank you for your response!&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;the following code works to put the date into the format I need.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;I had attempted this earlier, and kept getting an error I could not resolve.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;&amp;nbsp;date_f1&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;catt&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Q'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;qtr&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;date&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;put&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;year&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;date&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;4&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;now, my issue is to use that process in the following code.&amp;nbsp; "filedate" is a sas date that is on my incoming dataset.&amp;nbsp; the objective is to re-label 7 quarters of wage data (labeled wage1, wage2, etc) with the name of the quarter it represents.&amp;nbsp; the data is for 7 consecutive quarters, so I'm looking to rename 7 variables.&amp;nbsp; the file (and thus the filedate and the variable names) update quarterly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;my code below would work except yyq. (and all the other qtr formats) start with a number value (2018-1) and thus can't be used as a variable name.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;I am open to ANY easy workaround.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_1"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(filedate, &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_3"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_4"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_5"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_6"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"wage_7"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, put(intnx(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;'QTR'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, filedate, -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;), &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;yyq.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 14:59:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494150#M130173</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-10T14:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494161#M130177</link>
      <description>&lt;P&gt;Thank you again.&amp;nbsp; I got it to work finally.&lt;/P&gt;&lt;P&gt;Reeza, you are dealing with a novice here; I only understood half of what you said.&amp;nbsp; Even so, I'm just so happy to finally get this to work.&lt;/P&gt;&lt;P&gt;thank you thank you thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 15:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494161#M130177</guid>
      <dc:creator>wendy0327</dc:creator>
      <dc:date>2018-09-10T15:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494189#M130193</link>
      <description>&lt;P&gt;Not sure if you need a format if you just want to generate a string you can use as a variable name.&amp;nbsp; Why not just make a character variable with the string?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length name $32  ;
name = cats('Q', qtr(date), year(date));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you could use that variable as the ID variable in PROC transpose to create a variable with that name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could make a format using PICTURE format.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  picture QYY (default=6) low-high='Q%q%Y' (datatype=date);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 16:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494189#M130193</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-10T16:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date Format for Quarters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494460#M130301</link>
      <description>&lt;P&gt;Tom Super User,&lt;/P&gt;&lt;P&gt;thank you!&amp;nbsp; I had done the former, and now I can do the latter.&amp;nbsp; I was not getting my syntax correct for the proc format and still could not get it to work that way.&amp;nbsp; now it works.&amp;nbsp; I appreciate your time.&lt;/P&gt;&lt;P&gt;wendy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 12:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Format-for-Quarters/m-p/494460#M130301</guid>
      <dc:creator>wendy0327</dc:creator>
      <dc:date>2018-09-11T12:21:30Z</dc:date>
    </item>
  </channel>
</rss>

