<?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 Having a hard time creating a flag based on date variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Having-a-hard-time-creating-a-flag-based-on-date-variables/m-p/406341#M98926</link>
    <description>&lt;P&gt;I'm trying to create a flag variable and it isn't working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The piece I'm having issues with is the Perf='Y' flag (performance flag)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start='01Oct2016'd;&lt;BR /&gt;data NewGroups;
set groups;
thrudate=today()-45;
if (thrudate gt beg_dt) and (beg_dt &amp;gt;='01Oct2016'd) then Perf='Y'; else Perf='N';
/*if &amp;amp;today. &amp;gt;=&amp;amp;start. then Perf='Y'; else perf='N';*/
/*format thrudate date9.;*/
startdate=&amp;amp;Start.;
/*format startdate date9.;*/
PerfMonths=intck('month',startdate,thrudate);
beg_dt=input(begin_date,anydtdte19.);
/*format beg_dt date9.;*/
where beg_month &amp;gt;='01Oct2016'd;
run;
proc contents data=newgroups;
run;
proc print data=newgroups(obs=20);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 22 Oct 2017 03:58:05 GMT</pubDate>
    <dc:creator>Kaley</dc:creator>
    <dc:date>2017-10-22T03:58:05Z</dc:date>
    <item>
      <title>Having a hard time creating a flag based on date variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Having-a-hard-time-creating-a-flag-based-on-date-variables/m-p/406341#M98926</link>
      <description>&lt;P&gt;I'm trying to create a flag variable and it isn't working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The piece I'm having issues with is the Perf='Y' flag (performance flag)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start='01Oct2016'd;&lt;BR /&gt;data NewGroups;
set groups;
thrudate=today()-45;
if (thrudate gt beg_dt) and (beg_dt &amp;gt;='01Oct2016'd) then Perf='Y'; else Perf='N';
/*if &amp;amp;today. &amp;gt;=&amp;amp;start. then Perf='Y'; else perf='N';*/
/*format thrudate date9.;*/
startdate=&amp;amp;Start.;
/*format startdate date9.;*/
PerfMonths=intck('month',startdate,thrudate);
beg_dt=input(begin_date,anydtdte19.);
/*format beg_dt date9.;*/
where beg_month &amp;gt;='01Oct2016'd;
run;
proc contents data=newgroups;
run;
proc print data=newgroups(obs=20);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 22 Oct 2017 03:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Having-a-hard-time-creating-a-flag-based-on-date-variables/m-p/406341#M98926</guid>
      <dc:creator>Kaley</dc:creator>
      <dc:date>2017-10-22T03:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Having a hard time creating a flag based on date variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Having-a-hard-time-creating-a-flag-based-on-date-variables/m-p/406342#M98927</link>
      <description>&lt;P&gt;It looks as if you are using beg_dt before you are giving it a value.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2017 04:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Having-a-hard-time-creating-a-flag-based-on-date-variables/m-p/406342#M98927</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-22T04:13:33Z</dc:date>
    </item>
  </channel>
</rss>

