<?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 select between the numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791911#M253743</link>
    <description>Hi, I have a dataset A: 20110405 20120604 20130806 20140603 20150607 20160705 I want the data B from 20130806 to 20150607 only. Can I do this in SAS? thanks</description>
    <pubDate>Mon, 24 Jan 2022 16:55:19 GMT</pubDate>
    <dc:creator>Smitha9</dc:creator>
    <dc:date>2022-01-24T16:55:19Z</dc:date>
    <item>
      <title>select a duration</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791907#M253723</link>
      <description>Hi, I have a dataset A: 20110405 20120604 20130806 20140603 20150607 20160705 I want the data B from 20130806 to 20150607 only can I do this in SAS? thanks</description>
      <pubDate>Mon, 24 Jan 2022 16:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791907#M253723</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2022-01-24T16:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: select a duration</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791910#M253725</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know what kind of data you have, but is this what you mean?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input dt:yymmdd8.;
  format dt yymmdd8.;
datalines;
20110405
20120604
20130806
20140603
20150607
20160705
;
run;

data want;
  set have;
  if '06AUG2013'd &amp;lt;= dt &amp;lt;= '07JUN2015'd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jan 2022 16:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791910#M253725</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-01-24T16:55:01Z</dc:date>
    </item>
    <item>
      <title>select between the numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791911#M253743</link>
      <description>Hi, I have a dataset A: 20110405 20120604 20130806 20140603 20150607 20160705 I want the data B from 20130806 to 20150607 only. Can I do this in SAS? thanks</description>
      <pubDate>Mon, 24 Jan 2022 16:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791911#M253743</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2022-01-24T16:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: select a duration</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791917#M253729</link>
      <description>I do not want any format for the date . Dataset: ID Date 1 20110405 2 20120604 3 20130806 4 20140603 5 20150607 6 20160705 I want ID from 3 to 5 thanks</description>
      <pubDate>Mon, 24 Jan 2022 17:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791917#M253729</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2022-01-24T17:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: select between the numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791918#M253744</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    input date :yymmdd8. @@;
    format date yymmdd10.;
    cards;
20110405 20120604 20130806 20140603 20150607 20160705
;
data want;
    set have;
    if date&amp;gt;='08JUN2013'd and date&amp;lt;='06JUL2015'd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jan 2022 17:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791918#M253744</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-24T17:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: select a duration</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791919#M253730</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*if type of variable date = numeric */
data have;
input date ;
cards;
20110405
20120604
20130806
20140603
20150607
20160705
;run;

data want;
set have;
if  20130806 &amp;lt;= date &amp;lt;= 20150607;
run;

/*if type of variable date = character */
data have;
input date $ ;
cards;
20110405
20120604
20130806
20140603
20150607
20160705
;run;

data want;
set have;
if  '20130806' &amp;lt;= date &amp;lt;= '20150607';
run;

/*if type of variable date = date sas */
data have;
input date yymmdd8. ;
cards;
20110405
20120604
20130806
20140603
20150607
20160705
;run;

data want;
set have;
if '06AUG2013'd &amp;lt;= date &amp;lt;= '07JUN2015'd;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 17:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791919#M253730</guid>
      <dc:creator>kelxxx</dc:creator>
      <dc:date>2022-01-24T17:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: select a duration</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791920#M253731</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
if 3 &amp;lt;= ID &amp;lt;= 5;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jan 2022 17:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791920#M253731</guid>
      <dc:creator>kelxxx</dc:creator>
      <dc:date>2022-01-24T17:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: select a duration</title>
      <link>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791923#M253733</link>
      <description>&lt;P&gt;Provide the correct data and structure before asking questions.&lt;/P&gt;
&lt;P&gt;Do you want to filter by ID or by date, and are the values like date character values or numeric values?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 17:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/select-a-duration/m-p/791923#M253733</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-01-24T17:09:06Z</dc:date>
    </item>
  </channel>
</rss>

