<?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 IF/THEN/DELETE statement for time format variables. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687503#M24547</link>
    <description>&lt;P&gt;I have 4 variables that are formatted as time variables (hh:mm:ss). Specifically, I am looking to exclude any observations from the dataset where where the time interval is 00:00:00, negative, or greater than 01:00:00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I write this code in a typical if/then delete data set?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:23:16 GMT</pubDate>
    <dc:creator>njgrubic</dc:creator>
    <dc:date>2020-09-29T13:23:16Z</dc:date>
    <item>
      <title>IF/THEN/DELETE statement for time format variables.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687503#M24547</link>
      <description>&lt;P&gt;I have 4 variables that are formatted as time variables (hh:mm:ss). Specifically, I am looking to exclude any observations from the dataset where where the time interval is 00:00:00, negative, or greater than 01:00:00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I write this code in a typical if/then delete data set?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687503#M24547</guid>
      <dc:creator>njgrubic</dc:creator>
      <dc:date>2020-09-29T13:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: IF/THEN/DELETE statement for time format variables.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687507#M24548</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    if time_interval&amp;lt;='00:00:00't or time_interval&amp;gt;'01:00:00't then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As a side issue, the variables are not "formatted as time variables", they are time variables, representing the number of seconds after midnight, or if you really have an interval, the value is the number of seconds in the interval. The format used is irrelevant to the above code, which will work however the variable TIME_INTERVAL is formatted and will work if the variable is not formatted.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687507#M24548</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-29T13:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: IF/THEN/DELETE statement for time format variables.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687508#M24549</link>
      <description>&lt;P&gt;Which interval? Between values in separate observations for the same column, or between separate columns within a single observation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please supply some example data in a data step with datalines, and the expected outcome from that.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/IF-THEN-DELETE-statement-for-time-format-variables/m-p/687508#M24549</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-29T13:33:18Z</dc:date>
    </item>
  </channel>
</rss>

