<?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 Number  (with decimal) for time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504464#M134997</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable "DateTime" that looks like this&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token datalines"&gt;&lt;SPAN class="token data string"&gt;04MAR14:01:04:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;with the DATETIME format. I want to create a variable with decimal numbers for just time. For example, for the time above, it would be 01.00067 such as (01.(04/60)).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I go from SAS time to these numeric values?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Oct 2018 19:50:47 GMT</pubDate>
    <dc:creator>lalaktgrau</dc:creator>
    <dc:date>2018-10-15T19:50:47Z</dc:date>
    <item>
      <title>Number  (with decimal) for time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504464#M134997</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable "DateTime" that looks like this&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token datalines"&gt;&lt;SPAN class="token data string"&gt;04MAR14:01:04:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;with the DATETIME format. I want to create a variable with decimal numbers for just time. For example, for the time above, it would be 01.00067 such as (01.(04/60)).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I go from SAS time to these numeric values?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 19:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504464#M134997</guid>
      <dc:creator>lalaktgrau</dc:creator>
      <dc:date>2018-10-15T19:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Number  (with decimal) for time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504476#M135000</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let date_time= "04MAR14:01:04:00" ;
%let time_format=0%sysevalf(%substr(&amp;amp;date_time,10,2)+%sysfunc(round(%sysevalf(%sysfunc(inputn(%substr(&amp;amp;date_time,13,2),2.))/60),.00001)));
%put &amp;amp;=time_format;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Oct 2018 20:13:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504476#M135000</guid>
      <dc:creator>sidpesar</dc:creator>
      <dc:date>2018-10-15T20:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Number  (with decimal) for time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504488#M135007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/161934"&gt;@lalaktgrau&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
hours=timepart(datetime)/3600;
format hours z8.5;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that your example ("&lt;SPAN&gt;01.00067") is incorrect.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 20:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-with-decimal-for-time/m-p/504488#M135007</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-10-15T20:35:23Z</dc:date>
    </item>
  </channel>
</rss>

