<?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: check if 1AM falls between two timestamps in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/897124#M354516</link>
    <description>It shifts the beginning of the 24-hour period to the second hour (first hour would be 00:00). INTCK then counts how many of these beginnings are crossed.</description>
    <pubDate>Wed, 04 Oct 2023 10:51:14 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-10-04T10:51:14Z</dc:date>
    <item>
      <title>check if 1AM falls between two timestamps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/896601#M354284</link>
      <description>&lt;P&gt;Hi, how do I create a flag, WANT, that checks if 1AM falls between two timestamps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data task1;  
   input ID :$2. BEG_DT_TIME :datetime18. END_DT_TIME :datetime18. WANT;
   format BEG_DT_TIME END_DT_TIME datetime20.;
cards;
AA 28SEP2023:22:00:00.00 29SEP2023:02:00:00.00 1
BB 28SEP2023:07:30:00.00 28SEP2023:13:30:00.00 0
CC 28SEP2023:20:00:00.00 29SEP2023:00:00:00.00 0
DD 29SEP2023:00:00:00.00 29SEP2023:03:00:00.00 1
EE 29SEP2023:05:00:00.00 30SEP2023:03:00:00.00 1
	;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2023 03:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/896601#M354284</guid>
      <dc:creator>dataMart87</dc:creator>
      <dc:date>2023-10-02T03:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: check if 1AM falls between two timestamps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/896608#M354289</link>
      <description>&lt;P&gt;Create an new timestamp using the datepart of end_dt_time to compare it with the start and end:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Want = (beg_dt_time &amp;lt;= dhms(datepart(end_dt_time), 1, 0, 0) &amp;lt;= end_dt_time);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2023 06:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/896608#M354289</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-10-02T06:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: check if 1AM falls between two timestamps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/896631#M354303</link>
      <description>&lt;P&gt;Use INTCK with a properly shaped interval:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set task1;
calc_want = intck('hour24.2',beg_dt_time,end_dt_time) &amp;gt; 0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2023 10:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/896631#M354303</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-02T10:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: check if 1AM falls between two timestamps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/897069#M354488</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&amp;nbsp; Curious what the .2 in hour24.2 does?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 21:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/897069#M354488</guid>
      <dc:creator>dataMart87</dc:creator>
      <dc:date>2023-10-03T21:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: check if 1AM falls between two timestamps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/897124#M354516</link>
      <description>It shifts the beginning of the 24-hour period to the second hour (first hour would be 00:00). INTCK then counts how many of these beginnings are crossed.</description>
      <pubDate>Wed, 04 Oct 2023 10:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/check-if-1AM-falls-between-two-timestamps/m-p/897124#M354516</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-04T10:51:14Z</dc:date>
    </item>
  </channel>
</rss>

