<?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: format time to show business hours or after hours in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273930#M58486</link>
    <description>Thank you</description>
    <pubDate>Mon, 30 May 2016 15:28:58 GMT</pubDate>
    <dc:creator>Beto16</dc:creator>
    <dc:date>2016-05-30T15:28:58Z</dc:date>
    <item>
      <title>format time to show business hours or after hours</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273813#M58476</link>
      <description>Hi I have a table that has a datetime field and the ask came in if there was a way to determine if it was after hr or during business hrs ...&lt;BR /&gt;Here is example&lt;BR /&gt;&lt;BR /&gt;Id. Date time&lt;BR /&gt;A. 26 may 2016 11:53:00&lt;BR /&gt;C. 27may. 2016 06:00:00&lt;BR /&gt;&lt;BR /&gt;Here is what I need&lt;BR /&gt;Id. Date time. Business&lt;BR /&gt;A. 26 may 2016 11:53:00. AFTER&lt;BR /&gt;C. 27may. 2016 06:00:00. DURING&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Our business hrs start from 8 Am to 9 pm&lt;BR /&gt;7 days a week&lt;BR /&gt;Thanks for the assistance</description>
      <pubDate>Sun, 29 May 2016 17:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273813#M58476</guid>
      <dc:creator>Beto16</dc:creator>
      <dc:date>2016-05-29T17:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: format time to show business hours or after hours</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273837#M58482</link>
      <description>&lt;P&gt;Use TIMEPART() to get the time portion of your date time, and then format it with a custom format.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value business_hours_fmt
0 - &amp;lt; 28800, 75600 &amp;lt;- 86400 = "Outside"
28800 - 75600 = "Business Hours";
run;

/*Sample data*/
data want;
do time=3600 to 86400 by 3600;
i=time;
business_hours = put(time, business_hours_fmt.);
format time time.;
output;
end;
run;


data sample;
set have;
business_hours = put(datepart(datetime), business_hours_fmt.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 May 2016 00:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273837#M58482</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-30T00:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: format time to show business hours or after hours</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273930#M58486</link>
      <description>Thank you</description>
      <pubDate>Mon, 30 May 2016 15:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273930#M58486</guid>
      <dc:creator>Beto16</dc:creator>
      <dc:date>2016-05-30T15:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: format time to show business hours or after hours</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273937#M58487</link>
      <description>Got it to work thanks again I learn something new today</description>
      <pubDate>Mon, 30 May 2016 16:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-time-to-show-business-hours-or-after-hours/m-p/273937#M58487</guid>
      <dc:creator>Beto16</dc:creator>
      <dc:date>2016-05-30T16:30:05Z</dc:date>
    </item>
  </channel>
</rss>

