<?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 comparing time12.3 format with a num variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450304#M283712</link>
    <description>&lt;P&gt;So say I have a time12.3 format observation 9:09:39.359 and I have 8-digit number 093530 representing the time as hhmmss but I do not have the milliseconds, how do I compare these two observations? Will it work if I convert the numeric variable to a time8. format?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Apr 2018 07:56:24 GMT</pubDate>
    <dc:creator>Sasadomo</dc:creator>
    <dc:date>2018-04-02T07:56:24Z</dc:date>
    <item>
      <title>comparing time12.3 format with a num variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450304#M283712</link>
      <description>&lt;P&gt;So say I have a time12.3 format observation 9:09:39.359 and I have 8-digit number 093530 representing the time as hhmmss but I do not have the milliseconds, how do I compare these two observations? Will it work if I convert the numeric variable to a time8. format?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 07:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450304#M283712</guid>
      <dc:creator>Sasadomo</dc:creator>
      <dc:date>2018-04-02T07:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: comparing time12.3 format with a num variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450374#M283713</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202368"&gt;@Sasadomo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;So say I have a time12.3 format observation 9:09:39.359 and I have 8-digit number 093530 representing the time as hhmmss but I do not have the milliseconds, how do I compare these two observations? Will it work if I convert the numeric variable to a time8. format?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just changing the format will not help for comparison purposes. Create a new time variable&amp;nbsp;by pulling the hour,&amp;nbsp;minute and second&amp;nbsp;pieces out of that 8 digit number and using the HMS function.&lt;/P&gt;
&lt;P&gt;The INTCK function would likely be the best way for the actual comparison as you would indicate what unit of interest you are concerned with, hours, minutes, seconds between the two values. You could do the conversion to time inside the intck function call but you may want the other variable for easier verification of results. Don't forget to assign a time format to the new variable.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 15:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450374#M283713</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-02T15:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: comparing time12.3 format with a num variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450521#M283714</link>
      <description>&lt;P&gt;I changed the numeric variable to time format and line&lt;/P&gt;&lt;P&gt;"if '9:35:00't &amp;lt;= sect &amp;lt;= '15:55:00't;" worked here&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 04:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparing-time12-3-format-with-a-num-variable/m-p/450521#M283714</guid>
      <dc:creator>Sasadomo</dc:creator>
      <dc:date>2018-04-03T04:51:24Z</dc:date>
    </item>
  </channel>
</rss>

