<?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: HHMMSS SAS ISSUE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162122#M31475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why I got different results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6032&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;6033&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=input('0010',hhmmss.);&lt;/P&gt;&lt;P&gt;6034&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=input('123045',hhmmss.);&lt;/P&gt;&lt;P&gt;6035&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x2=input('0110',hhmmss.);&lt;/P&gt;&lt;P&gt;6036&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x3=input('1210',hhmmss.);&lt;/P&gt;&lt;P&gt;6037&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put x=time8. y=time8. x2=time8. x3=time8.;&lt;/P&gt;&lt;P&gt;6038&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=0:00:10 y=12:30:45 x2=0:01:10 x3=0:12:10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 May 2014 21:01:56 GMT</pubDate>
    <dc:creator>Abdu</dc:creator>
    <dc:date>2014-05-16T21:01:56Z</dc:date>
    <item>
      <title>HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162117#M31470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to read in the below data using hhmmss informat. While using hhmmss informat, when there are less that 6 digits in the input, as per SAS user guide, it appends zeros to the end to make it 6 digits and reads it in.&lt;/P&gt;&lt;P&gt;But when 0010 as read in using hhmmss in SAS, it is read as 10 hours instead of 10 minutes (as I would expect.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it a SAS bug? Anyone knows a work around to it. Thanks a lot for the help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test Program:&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=input('0010',hhmmss.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; y=input('123045',hhmmss.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put x=time8. y=time8.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS Log FIle:&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=input('0010',hhmmss.);&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=input('123045',hhmmss.);&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put x=time8. y=time8.;&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;x=10:00:00 y=12:30:45&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 14:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162117#M31470</guid>
      <dc:creator>geoonline</dc:creator>
      <dc:date>2014-05-16T14:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162118#M31471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added these cases:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x2=input('0110',hhmmss.);&lt;/P&gt;&lt;P&gt;x3=input('1210',hhmmss.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and they both worked correctly. I agree with you that your "x" example should be 00:10:00, not 10:00:00. I suspect that SAS is disregarding left digits of zero, and this isn't correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd fire it off to tech support, if they haven't already noticed your post. Please post with the response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 14:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162118#M31471</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-05-16T14:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162119#M31472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A work around would be to read the value as text and if the length is less than 6 to append 0 to make it the needed length and then input as in your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did note that using a explicit length with the format such as hhmmss6. then it reads as seconds. If I used the B8601tm. format it did read 10 minutes but also had 12 seconds?!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 14:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162119#M31472</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-16T14:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162120#M31473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=input('0010',hhmmss6.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still getting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=10:00:00 y=12:30:45&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 16:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162120#M31473</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-05-16T16:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162121#M31474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Version of SAS dependency perhaps, I'm on 9.2.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 16:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162121#M31474</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-16T16:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162122#M31475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why I got different results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6032&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;6033&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=input('0010',hhmmss.);&lt;/P&gt;&lt;P&gt;6034&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y=input('123045',hhmmss.);&lt;/P&gt;&lt;P&gt;6035&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x2=input('0110',hhmmss.);&lt;/P&gt;&lt;P&gt;6036&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x3=input('1210',hhmmss.);&lt;/P&gt;&lt;P&gt;6037&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put x=time8. y=time8. x2=time8. x3=time8.;&lt;/P&gt;&lt;P&gt;6038&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x=0:00:10 y=12:30:45 x2=0:01:10 x3=0:12:10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 21:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162122#M31475</guid>
      <dc:creator>Abdu</dc:creator>
      <dc:date>2014-05-16T21:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162123#M31476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is getting weird!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoonline, when you refer this to SAS tech support, be sure to point them at this discussion!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 21:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162123#M31476</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2014-05-16T21:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162124#M31477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for the response...I believe the difference in result is due to the SAS version. I have tried it in SAS 9.2 &amp;amp; SAS 9.3, both giving different results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 21:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162124#M31477</guid>
      <dc:creator>geoonline</dc:creator>
      <dc:date>2014-05-16T21:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162125#M31478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Related to this hotfix possibly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/39/035.html" title="http://support.sas.com/kb/39/035.html"&gt;39035 - The HHMMSS informat reads time values without delimiters&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2014 21:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162125#M31478</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-16T21:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: HHMMSS SAS ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162126#M31479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I contacted SAS Tech Support regarding this issue. They already seem to be aware of this issue and SAS R&amp;amp;D is currrently working on a fix to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime SAS suggests to use B8601TMw.d informat to read in these values correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's documented here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n0tx8gqdnl4undn11upjn4les9k2.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/leforinforref/64790/HTML/default/viewer.htm#n0tx8gqdnl4undn11upjn4les9k2.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried it with the above examples and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for all your responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Geo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 19:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HHMMSS-SAS-ISSUE/m-p/162126#M31479</guid>
      <dc:creator>geoonline</dc:creator>
      <dc:date>2014-05-20T19:13:18Z</dc:date>
    </item>
  </channel>
</rss>

