<?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: How to if than time in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106926#M29795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: medium; text-align: -webkit-auto;"&gt;Hi Fugue, &lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: medium; text-align: -webkit-auto;"&gt;Thanks for the response when I run the script I get this out put--- 1691569440 the start date I have is 08aug2013 0;8:24:00 is that a formatting issue ? Thanks again &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Aug 2013 15:26:58 GMT</pubDate>
    <dc:creator>BETO</dc:creator>
    <dc:date>2013-08-12T15:26:58Z</dc:date>
    <item>
      <title>How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106921#M29790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;i've a question. I have a report that shows all the tickets open in a 24 hr period. If the ticket is open at 8 am thru 8 pm&amp;nbsp; we have a 4 hr window to work ticket. The issue is if the ticket opens after 8 pm - 8 am&amp;nbsp; the office is close so the ticket can't be worked within the 4 hr window. I was wondering if there is a way to create an if statement where ticket open at off hrs to&amp;nbsp; default to 8 am?&amp;nbsp; For example &lt;/P&gt;&lt;P&gt; the ticket open. At &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;09Aug 2013 09::24:00 PM&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Would like to see&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;10Aug 2013 08:00:00 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks for your assistance &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106921#M29790</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-08-09T18:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106922#M29791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this perhaps assuming your ticket open datetime variable is named TicketOpen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hour(TicketOpen) ge 16 then ActualTicketOpen = DHMS((datepart(TicketOpen)+1),8,0,0);&lt;/P&gt;&lt;P&gt;else ActualTicketOpen=TicketOpen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apply the same format to the ActualTicketOpen, or what ever you might decide to call it, as TicketOpen.&lt;/P&gt;&lt;P&gt;Depending on your actual business rulesyou may want to change the GE to GT (or &amp;gt; ) if you do want to have the 09Aug 2012 08:00:00PM treatet as opened on 09 instead of 10 Aug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 21:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106922#M29791</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-08-09T21:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106923#M29792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THank you for response I do have a question what does 16 equal to is that military time for 4 o'clock ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Aug 2013 01:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106923#M29792</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-08-11T01:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106924#M29793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to modfiy BallardW's suggestion to deal with calls before 8am. In response to your question, 20:00 hours is 8pm in military time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adaptation of Ballardw's code to deal with pre-8am and post-8pm . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hour(TicketOpen) lt 8 then ActualTicketOpen = DHMS((datepart(TicketOpen)),8,0,0);&lt;/P&gt;&lt;P&gt;else if hour(TicketOpen) ge 20 then ActualTicketOpen = DHMS((datepart(TicketOpen)+1),8,0,0);&lt;/P&gt;&lt;P&gt;else ActualTicketOpen=TicketOpen;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Aug 2013 06:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106924#M29793</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-11T06:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106925#M29794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Knowing all exceptions opening times etc you can code it all.&lt;BR /&gt;An other approach is just keep the INTNX INTCK fucntions. The are meant to deal with time/date shifting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the INTERVALDS option, see &lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p150mod713bb53n19181dkbi6a3r.htm" title="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p150mod713bb53n19181dkbi6a3r.htm"&gt;SAS(R) 9.3 System Options: Reference, Second Edition&lt;/A&gt;. You can define sliding dates /times accourding own definitions. It are some addtional concepts changing releases &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p0g056g35ez8son1sfavozh0lfb3.htm" title="http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p0g056g35ez8son1sfavozh0lfb3.htm"&gt;SAS(R) 9.3 Language Reference: Concepts, Second Edition&lt;/A&gt; (datetime concepts) custom intervals. The r445 544 454 options might be also handy.&lt;/P&gt;&lt;P&gt;The concept is: Define a dataset with your valid (opening hours) ordered!. All durations will be adjusted according that&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Aug 2013 06:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106925#M29794</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-08-11T06:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106926#M29795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: medium; text-align: -webkit-auto;"&gt;Hi Fugue, &lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica; font-size: medium; text-align: -webkit-auto;"&gt;Thanks for the response when I run the script I get this out put--- 1691569440 the start date I have is 08aug2013 0;8:24:00 is that a formatting issue ? Thanks again &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 15:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106926#M29795</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-08-12T15:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106927#M29796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Helvetica; font-size: medium; text-align: -webkit-auto;"&gt;How can I apply the between statement&amp;nbsp; to include from 20-23 and from 00 - 8 in hours ? I actually fig it out the format issue an the script works thanks again Is it possible to add the between statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 16:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106927#M29796</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2013-08-12T16:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to if than time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106928#M29797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a data step, the code would look something like . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if 0&amp;lt;= hour(TicketOpen) &amp;lt; 8 then ActualTicketOpen = DHMS((datepart(TicketOpen)),8,0,0);&lt;/P&gt;&lt;P&gt;else if 20&amp;lt;= hour(TicketOpen) &amp;lt;=23 then ActualTicketOpen = DHMS((datepart(TicketOpen)+1),8,0,0);&lt;/P&gt;&lt;P&gt;else ActualTicketOpen=TicketOpen;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 19:44:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-if-than-time/m-p/106928#M29797</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2013-08-12T19:44:18Z</dc:date>
    </item>
  </channel>
</rss>

