<?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: Time to numeric with colon separator in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484555#M287055</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88478"&gt;@Hb21Pzn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;HI,&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;Unfortunetelly I am not able to do that without converting time format to numeric (only one way to convert time to measure and implement that on plot) which is not good enoough to present.&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Explain! This is usually good enough for most people.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rather like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 08:37:23 (time format) --&amp;gt; 83723 (numeric) --&amp;gt; 8:37:23 (numeric with colon as decimal)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;The mistake you are making is assuming that time is a character string of some sort. It is not. It is a numeric. It is being shown to you as 08:37:23, but it is really the number of seconds since midnight. This works fine in almost any application I can think of. Converting this number to something else is the wrong thing to do. Leave it as a number, and plot it on your Y axis, with the proper format (whatever time format you like), and that will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Aug 2018 22:06:39 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-08-06T22:06:39Z</dc:date>
    <item>
      <title>Time to numeric with colon separator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484553#M287054</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be really gratefull for help, because after three days I have run out of ideas.&lt;/P&gt;&lt;P&gt;I&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;would like to present ending times of some processes on timeseries plot in VA (must be dashboard).&lt;/P&gt;&lt;P&gt;X axis should be the date (here everything is fine) and Y axis should be the corresponding time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunetelly I am not able to do that without converting time format to numeric (only one way to convert time to measure and implement that on plot) which is not good enoough to present.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the thing is that&amp;nbsp;I have an idea to convert time format variable to integer, but not like normal amount of second from 00:00:00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rather like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 08:37:23 (time format) --&amp;gt; 83723 (numeric) --&amp;gt; 8:37:23 (numeric with colon as decimal)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After carying out&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;these&amp;nbsp;steps&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and load data into lasr everythig should work, but i can't convert&amp;nbsp; time data properly in last transformation.&lt;/P&gt;&lt;P&gt;I am putting code below which partialy doing what i want, but colon is not on right places. At least is numeric and has colon, so it must be possible &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc format library=work;&lt;BR /&gt;picture mysep&lt;/P&gt;&lt;P&gt;0 - 999999 = '000:000:00' (decsep=':' dig3sep=':');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;x= 123456;&lt;BR /&gt;format x mysep.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hubert&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 22:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484553#M287054</guid>
      <dc:creator>Hb21Pzn</dc:creator>
      <dc:date>2018-08-06T22:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Time to numeric with colon separator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484555#M287055</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88478"&gt;@Hb21Pzn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;HI,&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;Unfortunetelly I am not able to do that without converting time format to numeric (only one way to convert time to measure and implement that on plot) which is not good enoough to present.&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Explain! This is usually good enough for most people.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rather like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 08:37:23 (time format) --&amp;gt; 83723 (numeric) --&amp;gt; 8:37:23 (numeric with colon as decimal)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;The mistake you are making is assuming that time is a character string of some sort. It is not. It is a numeric. It is being shown to you as 08:37:23, but it is really the number of seconds since midnight. This works fine in almost any application I can think of. Converting this number to something else is the wrong thing to do. Leave it as a number, and plot it on your Y axis, with the proper format (whatever time format you like), and that will work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 22:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484555#M287055</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-06T22:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Time to numeric with colon separator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484562#M287056</link>
      <description>&lt;P&gt;TIME in SAS is measured in SECONDS. Since hours=60 minutes and a minute is 60 seconds the value 83723&amp;nbsp;has NO connection as far as SAS is concerned with 8:37:23.&lt;/P&gt;
&lt;PRE&gt;data _null_;
   x=hms(8,37,23);
   put "x as number of seconds: " x= +1 "X with a time format: " x= time8.;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;Your code shows NO attempt to "convert" anything. So I am not sure what you think you are attempting.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;A simple time format for time values should work for most purposes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;If you want the VA way of doing things, then post the question in the Visual Analytics part of the forum. You should also describe exactly how and why "Unfortunetelly I am not able to do that without converting time format to numeric (only one way to convert time to measure and implement that on plot) which is not good enough to present."&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;By any chance are your "times" actually datetime values? You might need to extract the date and time portions with the DATEPART and TIMEPART functions to create your X and Y variables. It would then still be a good idea to use Time and one of the date formats for the resultant variables.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 22:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484562#M287056</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-06T22:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Time to numeric with colon separator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484638#M287057</link>
      <description>&lt;P&gt;I know everything about that what you are saying regarding times:) I am trying to find any agile sollution which would give me any acceptable view on visualization in VA. This one unforunetely doesn't work... I will open new ticket, because I have realized that is not good group. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 07:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-to-numeric-with-colon-separator/m-p/484638#M287057</guid>
      <dc:creator>Hb21Pzn</dc:creator>
      <dc:date>2018-08-07T07:31:13Z</dc:date>
    </item>
  </channel>
</rss>

