<?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: Trying to create a new variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782633#M39892</link>
    <description>&lt;P&gt;&lt;SPAN&gt;The YEAR-QTR column is giving me year month and thats after i changed the q6. to q7. - q6. only gave me 2021-0&amp;nbsp; and no month number wher as q7. gave me 2021-03 for March 2021.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Nov 2021 03:50:18 GMT</pubDate>
    <dc:creator>anonymous_user</dc:creator>
    <dc:date>2021-11-27T03:50:18Z</dc:date>
    <item>
      <title>Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782285#M39872</link>
      <description>&lt;P&gt;Pulling only EM codes and trying to create a column to flag EM codes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data EMpull;&lt;BR /&gt;set OUTPAT;&lt;BR /&gt;if cpt between '99201' and '99215' or between&lt;BR /&gt;'99241' and '99245'&lt;BR /&gt;or '99381' and '99397' or&lt;BR /&gt;'99354' and '99355'&lt;BR /&gt;or '99401' and '99412' then EMflag="EM";&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 19:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782285#M39872</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T19:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782291#M39873</link>
      <description>&lt;P&gt;What is your question?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 19:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782291#M39873</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-24T19:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782298#M39874</link>
      <description>&lt;P&gt;I figured it out. Was just trying to pull in all EM code data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I'm trying to split them into two quarters - 1/1/2021 - 3/31/2021 = Q1 and 4/1/2021 - 6/30/2021 i= Q2.&amp;nbsp; Where would I do that in this data set?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data EMpull;&lt;BR /&gt;set OUTPAT;&lt;BR /&gt;where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')&lt;BR /&gt;or (cpt between '99241' and '99245')&lt;BR /&gt;or (cpt between '99381' and '99397')&lt;BR /&gt;or (cpt between '99354' and '99355')&lt;BR /&gt;or (cpt between '99401' and '99412');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 19:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782298#M39874</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T19:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782301#M39875</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EMpull;
set OUTPAT;
where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')
or (cpt between '99241' and '99245')
or (cpt between '99381' and '99397')
or (cpt between '99354' and '99355')
or (cpt between '99401' and '99412');

Quarter = put(date, yyq6.);
QuarterNumber = QTR(date);

run;

 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 20:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782301#M39875</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-24T20:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782322#M39876</link>
      <description>&lt;P&gt;I'm trying to create a a Q! and Q2 date range.&amp;nbsp; How do i create that first?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q1 = 1/1/2021 thru 3/31/2021 and Q2 = 4/1/2021-6/30/2021&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 21:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782322#M39876</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T21:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782361#M39877</link>
      <description>What does that mean in terms of a data set? My assumption was you had a date variable that you want to categorize rows as Q1/Q2.</description>
      <pubDate>Wed, 24 Nov 2021 22:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782361#M39877</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-24T22:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782364#M39878</link>
      <description>&lt;P&gt;Yes I have two date ranges to split into quarters - Q1 and Q2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data EMpull;&lt;BR /&gt;set OUTPAT;&lt;BR /&gt;where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')&lt;BR /&gt;or (cpt between '99241' and '99245')&lt;BR /&gt;or (cpt between '99381' and '99397')&lt;BR /&gt;or (cpt between '99354' and '99355')&lt;BR /&gt;or (cpt between '99401' and '99412');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021') THEN Q1;&lt;BR /&gt;else if ('01Apr2021' &amp;lt;= eventDate &amp;lt;= '30Jun2021') THEN Q2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 22:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782364#M39878</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T22:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782365#M39879</link>
      <description>&lt;P&gt;Yes I have two date ranges to split into quarters - Q1 and Q2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data EMpull;&lt;BR /&gt;set OUTPAT;&lt;BR /&gt;where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')&lt;BR /&gt;or (cpt between '99241' and '99245')&lt;BR /&gt;or (cpt between '99381' and '99397')&lt;BR /&gt;or (cpt between '99354' and '99355')&lt;BR /&gt;or (cpt between '99401' and '99412');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021') THEN Q1;&lt;BR /&gt;else if ('01Apr2021' &amp;lt;= eventDate &amp;lt;= '30Jun2021') THEN Q2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 22:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782365#M39879</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T22:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782366#M39880</link>
      <description>&lt;P&gt;I just want a column called "QTR" then in that column for each date range should say either Q1 or Q2&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 22:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782366#M39880</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T22:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782375#M39881</link>
      <description>Did you try the code I posted? What did you get?&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Nov 2021 22:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782375#M39881</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-24T22:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782381#M39882</link>
      <description>&lt;P&gt;it gives me this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quarter=2021-05 QuarterNumber=. _ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not showing the Q1 or Q2 or anything in the data for that column&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 23:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782381#M39882</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-24T23:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782382#M39883</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EMpull;
set OUTPAT;
where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')
or (cpt between '99241' and '99245')
or (cpt between '99381' and '99397')
or (cpt between '99354' and '99355')
or (cpt between '99401' and '99412');

 
*brute force method - not recommended;
if ('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021') THEN QTR="Q1";
else if ('01Apr2021' &amp;lt;= eventDate &amp;lt;= '30Jun2021') THEN QTR="Q2";

*better way;
QTR=catt('Q', qtr(eventDate));

RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Fully tested example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data stocks;
set sashelp.stocks;
where stock = 'IBM';
QTR=catt("Q", qtr(date));
YEAR_QTR = put(date, yyq6.);
keep date QTR YEAR_QTR;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@anonymous_user&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;it gives me this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quarter=2021-05 QuarterNumber=. _ERROR_=1 _N_=1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not showing the Q1 or Q2 or anything in the data for that column&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 23:16:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782382#M39883</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-24T23:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782619#M39886</link>
      <description>&lt;P&gt;Ok , how do you create the actual date range?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like for Q1 = 1/1/2021-3/31/2021 and Q2 is 4/1/2021-6/30/2021.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried doing between operators and it doesn't work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my ignorance, I need this laid out in lay terms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 01:18:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782619#M39886</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-27T01:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782620#M39887</link>
      <description>&lt;P&gt;This is what I've done with the example you provided (the output isnt making sense):&lt;/P&gt;&lt;P&gt;data EMpull;&lt;BR /&gt;set OUTPAT;&lt;BR /&gt;where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')&lt;BR /&gt;or (cpt between '99241' and '99245')&lt;BR /&gt;or (cpt between '99381' and '99397')&lt;BR /&gt;or (cpt between '99354' and '99355')&lt;BR /&gt;or (cpt between '99401' and '99412');&lt;/P&gt;&lt;P&gt;QTR=catt('Q1', qtr('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021'));&lt;BR /&gt;/*catt('Q2', qtr('01Apr2021' &amp;lt;= eventDate &amp;lt;= '30Jun2021'));*/&lt;BR /&gt;YEAR_QTR = put(('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021'), yyq6.);&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 01:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782620#M39887</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-27T01:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782628#M39888</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@anonymous_user&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;QTR=catt('Q1', qtr('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021'));&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;YEAR_QTR = put(('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021'), yyq6.);&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The QTR() function operates on DATE values, but you passed it a BOOLEAN value (1=true 0=false) instead.&lt;/P&gt;
&lt;P&gt;The YYQ. format operates on DATE values, but you also passed it a BOOLEAN value.&lt;/P&gt;
&lt;P&gt;Since 0 and 1 are the first and second day of 1960 your code is equivalent to:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;QTR='Q11';
YEAR_QTR = '1960Q1';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Why not try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;QTR=qtr(eventDate);
YEAR_QTR = put(eventDate,yyq6.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then if you want to limit the data to values in first two quarters of 2021 you could add:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if year_qtr in ('2021Q1' '2021Q2');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 27 Nov 2021 03:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782628#M39888</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-27T03:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782629#M39889</link>
      <description>&lt;P&gt;This is what I got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;21&lt;BR /&gt;22 GOPTIONS ACCESSIBLE;&lt;BR /&gt;23 data EMpull;&lt;BR /&gt;24 set OUTPAT;&lt;BR /&gt;25 where ( '99201' &amp;lt;= cpt &amp;lt;= '99215')&lt;BR /&gt;26 or (cpt between '99241' and '99245')&lt;BR /&gt;27 or (cpt between '99381' and '99397')&lt;BR /&gt;28 or (cpt between '99354' and '99355')&lt;BR /&gt;29 or (cpt between '99401' and '99412');&lt;BR /&gt;30&lt;BR /&gt;31 QTR=qtr(eventDate);&lt;BR /&gt;32 YEAR_QTR = put(eventDate,yyq6.);&lt;BR /&gt;_____&lt;BR /&gt;484&lt;BR /&gt;NOTE 484-185: Format $YYQ was not found or could not be loaded.&lt;/P&gt;&lt;P&gt;33 if year_qtr in ('2021Q1' '2021Q2');&lt;BR /&gt;34&lt;BR /&gt;35 /*QTR=catt("Q", qtr('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021'));&lt;BR /&gt;36&lt;BR /&gt;37 /*YEAR_QTR = put(('01Jan2021' &amp;lt;= eventDate &amp;lt;= '31Mar2021'), yyq6.);*/&lt;BR /&gt;38&lt;BR /&gt;39 RUN;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 03:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782629#M39889</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-27T03:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782631#M39890</link>
      <description>&lt;P&gt;There are only two quarters in my data - Jan - jun - q1 and q2; there is no q3 or q4.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 03:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782631#M39890</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-27T03:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782633#M39892</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The YEAR-QTR column is giving me year month and thats after i changed the q6. to q7. - q6. only gave me 2021-0&amp;nbsp; and no month number wher as q7. gave me 2021-03 for March 2021.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 03:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782633#M39892</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2021-11-27T03:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a new variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782643#M39895</link>
      <description>&lt;P&gt;That is saying that you cannot use the YYQ format with a character variable.&amp;nbsp; Your dates need to be actual DATE values to use date operations.&amp;nbsp;SAS stores dates as the number of days since 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So perhaps the first thing you need to do is convert&amp;nbsp;&lt;SPAN&gt;eventDate into an actual DATE.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What types of strings does it contain?&amp;nbsp; Find the right informat that will convert string in that style into date values and use the INPUT() function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 06:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-create-a-new-variable/m-p/782643#M39895</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-27T06:06:19Z</dc:date>
    </item>
  </channel>
</rss>

