<?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 Referencing Time Values to Create a Group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277943#M55874</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have some hospital data and want to create a field of "Shifts" based on the registration time.&amp;nbsp; I created the time by using "timepart(regdttm).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For shift I specified the length as 15 and used the code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if admhour ge '7:00't&amp;nbsp; and admhour le '17:00't then shift="0700 to 1700 hours";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesn't produce an error but doesn't have anything showing in the "shift" column even though there are cases that should be.&amp;nbsp; I also tried leaving the time in its SAS format and entered as a number but that didn't work either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All assistance greatly appreciated.&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2016 15:46:41 GMT</pubDate>
    <dc:creator>shellp55</dc:creator>
    <dc:date>2016-06-16T15:46:41Z</dc:date>
    <item>
      <title>Referencing Time Values to Create a Group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277943#M55874</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have some hospital data and want to create a field of "Shifts" based on the registration time.&amp;nbsp; I created the time by using "timepart(regdttm).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For shift I specified the length as 15 and used the code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if admhour ge '7:00't&amp;nbsp; and admhour le '17:00't then shift="0700 to 1700 hours";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesn't produce an error but doesn't have anything showing in the "shift" column even though there are cases that should be.&amp;nbsp; I also tried leaving the time in its SAS format and entered as a number but that didn't work either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All assistance greatly appreciated.&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 15:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277943#M55874</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2016-06-16T15:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing Time Values to Create a Group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277970#M55885</link>
      <description>&lt;P&gt;The error is not in the code shown, it most likely reside at or prior to the calculation of admHour. Please post more.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 17:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277970#M55885</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-16T17:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing Time Values to Create a Group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277971#M55886</link>
      <description>&lt;P&gt;Duh, stupid mistake on my part - the Ahour formula was before the field of regdttm had been created so once I put the shift after the field existed it worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much PG Stats!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 17:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Referencing-Time-Values-to-Create-a-Group/m-p/277971#M55886</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2016-06-16T17:11:48Z</dc:date>
    </item>
  </channel>
</rss>

