<?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 informat in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332145#M74738</link>
    <description>&lt;P&gt;Please post the contents of your text file as text (copy/paste to a {i} subwindow). I'm not typing test data manually from a picture.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2017 12:49:46 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-02-13T12:49:46Z</dc:date>
    <item>
      <title>Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332125#M74729</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I tried to use STIMERw. and TIMEw. informats but am getting error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly go through the attached doc for the refff.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13433i8FBCE653C9C24547/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="jhwXT0MCeS_2JibG34NgiBPzkrmRm3SLPQ.png" title="jhwXT0MCeS_2JibG34NgiBPzkrmRm3SLPQ.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13434i48F947CA89770E40/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="LcxOTxM6TL8aOd_WoJMTXijzsvBv7lFOPA.png" title="LcxOTxM6TL8aOd_WoJMTXijzsvBv7lFOPA.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13435i7B52484C702660B6/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="tDaidsz-TXPDzqHBlPqgzKnu420yVxZpJQ.png" title="tDaidsz-TXPDzqHBlPqgzKnu420yVxZpJQ.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13436i9A164BF332642EA1/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="where to get all wps out put window.PNG" title="where to get all wps out put window.PNG" /&gt;</description>
      <pubDate>Mon, 13 Feb 2017 11:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332125#M74729</guid>
      <dc:creator>mrinmoy</dc:creator>
      <dc:date>2017-02-13T11:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332126#M74730</link>
      <description>&lt;P&gt;Post test data and code as text in the code window ({i} above the post or the SAS symbol), this isn't a game of picture hunt!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your first question, I know of no format called stimer, which is probably why it isn't recognised. &amp;nbsp;Unless its a very new one its invalid, so where did you get the idea that it was?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The timeX.D variable should work, although what do you expect from length 7? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Time5. = HH:MM&lt;/P&gt;
&lt;P&gt;Time8. = HH:MM:SS&lt;/P&gt;
&lt;P&gt;As for the last picture I have no idea what you mean.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 11:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332126#M74730</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-13T11:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332130#M74733</link>
      <description>&lt;P&gt;Which SAS version are you using? The STIMER informat has been around since at least 9.2:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input timeval :stimer8.;
format timeval time8.;
cards;
22
22:23
15:23:27
;
run;

proc print data=test noobs;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt; timeval

 0:00:22
 0:22:23
15:23:27
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 11:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332130#M74733</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-13T11:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332141#M74736</link>
      <description>&lt;P&gt;data X;&lt;/P&gt;&lt;P&gt;infile " file location .dat";&lt;/P&gt;&lt;P&gt;input canoe $&amp;nbsp;@ 'school:' school $&amp;nbsp;@ 'time:' racetime :time7.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly have a look at the attach fiel for the log out put&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13437i8928C9D01CD34D17/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="YPuAS_WQ7eogx6uQzZgc6HUcH9TcCYj8-w.png" title="YPuAS_WQ7eogx6uQzZgc6HUcH9TcCYj8-w.png" /&gt;</description>
      <pubDate>Mon, 13 Feb 2017 12:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332141#M74736</guid>
      <dc:creator>mrinmoy</dc:creator>
      <dc:date>2017-02-13T12:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332145#M74738</link>
      <description>&lt;P&gt;Please post the contents of your text file as text (copy/paste to a {i} subwindow). I'm not typing test data manually from a picture.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 12:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332145#M74738</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-13T12:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332211#M74746</link>
      <description>&lt;P&gt;From the documentaion:&lt;/P&gt;
&lt;H1&gt;&lt;A name="a000197899" target="_blank"&gt;&lt;/A&gt;TIME&lt;SPAN class="emph"&gt;w&lt;/SPAN&gt;. Informat&lt;/H1&gt;
&lt;HR /&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="shortDesc"&gt;Reads hours, minutes, and seconds in the form &lt;STRONG&gt;&lt;SPAN class="emph"&gt;hh:mm:ss.ss&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="shortDesc"&gt;&lt;SPAN class="emph"&gt;So TIME would fail because you do not have an hour component. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="shortDesc"&gt;&lt;SPAN class="emph"&gt;Which version of SAS are you running? STIMER should be available if SAS 9.2 or later.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 15:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332211#M74746</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-13T15:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332236#M74759</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/125314"&gt;@mrinmoy&lt;/a&gt;when hunting for a suitable informat, use the format hunter - as described in paper at&amp;nbsp;&lt;A title="VFORMAT Lets SAS® Do the Format Searching" href="http://support.sas.com/resources/papers/proceedings14/1744-2014.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings14/1744-2014.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%LET  string=    23:45.0 ; * test this ;
%LET require= "0:23:45"t ; * result wanted ;
DATA time_test ; 
 RETAIN string "&amp;amp;string" /* value to be tested */
        Want1   &amp;amp;require /* result wanted */
 ; 
 SET sashelp.vformat ; * list of all formats ; 
 WHERE fmtType = 'I' ;           * only INFORMAT rows ;
 WHERE ALSO fmtName ne: '$' ;    * not character formats;
 
 inValue = INPUTN( string, fmtName, length(string) ) ; * perform test ;
 
 if _error_ then do;
    _error_ = 0 ; * avoiding variable dump in the SAS log ;
    Delete ;
 End ;
 if invalue = want1 ; * now check value returned ;
 PUT "&amp;amp;string " inValue= invalue dateTime. +1 fmtname= ;
RUN ;&lt;/PRE&gt;
&lt;P&gt;The results indicate success for &amp;nbsp;hhmmss. as well as stimer. So if your SAS release doesn't support informat stimer. you might have success with informat HHMMSS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 17:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332236#M74759</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2017-02-13T17:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Time informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332268#M74772</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@ &lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/125314" target="_self"&gt;&lt;SPAN class=""&gt;mrinmoy&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I see you are using WPS&lt;/P&gt;
&lt;P&gt;That might explain the absence of the STIMER informat&lt;/P&gt;
&lt;P&gt;If the HHMMSS informat doesn't work either, you might need to speak to the producers of WPS to see if they can add these informats, or provide you the support you need in some other way&lt;/P&gt;
&lt;P&gt;all the best&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 17:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-informat/m-p/332268#M74772</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2017-02-13T17:39:29Z</dc:date>
    </item>
  </channel>
</rss>

