<?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: Invalid Numeric data on timepart in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269536#M53428</link>
    <description>Returns numerical values, that aren't in time format. If a second Format myTime Time.; is run it will show it in a time format, but the seconds become minutes. So 00:08 becomes 480 which SAS reads as 0:08:00 instead of 0:00:08.&lt;BR /&gt;&lt;BR /&gt;A work around I've just come up with is&lt;BR /&gt;min = input(substr(myTimeString,1,2),2.);&lt;BR /&gt;sec = input(substr(myTimeString,4,2),2.);&lt;BR /&gt;myTime = (min*60) + sec;&lt;BR /&gt;FORMAT myTime Time.;&lt;BR /&gt;&lt;BR /&gt;Which does convert 00:08 to 0:00:08. But seems like a lot of extra steps that I'm not sure if it's needed.</description>
    <pubDate>Tue, 10 May 2016 18:17:16 GMT</pubDate>
    <dc:creator>EarlyCode</dc:creator>
    <dc:date>2016-05-10T18:17:16Z</dc:date>
    <item>
      <title>Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269530#M53425</link>
      <description>&lt;P&gt;I have a report that has a time value in excel formatted to MM: SS. (01:32; 00:56, etc)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When imported, they import as a text string. I need to convert it into a value that can be used in calculations. I've tried a couple of different methods to convert the text string. (Including changing the string to HH:MM: SS format) But every method I've tried to use to&amp;nbsp;convert it returns null value and the Invalid numeric data, Time='00:26' error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone help me with the correct method to convert a time text string to a value that can be used for calculations?&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 17:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269530#M53425</guid>
      <dc:creator>EarlyCode</dc:creator>
      <dc:date>2016-05-10T17:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269533#M53427</link>
      <description>&lt;P&gt;myTime = input(myTimeString, time.);&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 18:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269533#M53427</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-10T18:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269536#M53428</link>
      <description>Returns numerical values, that aren't in time format. If a second Format myTime Time.; is run it will show it in a time format, but the seconds become minutes. So 00:08 becomes 480 which SAS reads as 0:08:00 instead of 0:00:08.&lt;BR /&gt;&lt;BR /&gt;A work around I've just come up with is&lt;BR /&gt;min = input(substr(myTimeString,1,2),2.);&lt;BR /&gt;sec = input(substr(myTimeString,4,2),2.);&lt;BR /&gt;myTime = (min*60) + sec;&lt;BR /&gt;FORMAT myTime Time.;&lt;BR /&gt;&lt;BR /&gt;Which does convert 00:08 to 0:00:08. But seems like a lot of extra steps that I'm not sure if it's needed.</description>
      <pubDate>Tue, 10 May 2016 18:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269536#M53428</guid>
      <dc:creator>EarlyCode</dc:creator>
      <dc:date>2016-05-10T18:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269542#M53429</link>
      <description>&lt;P&gt;&lt;SPAN&gt;myTime = input(myTimeString, time.);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;format myTime time5,;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 18:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269542#M53429</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-10T18:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269545#M53430</link>
      <description>&lt;P&gt;If you don't mind a message about conversion on the log, you could shorten your equations to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;myTime = 60* input(myTimeString, 2.) + scan(myTimeString, 2, ':');&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 18:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269545#M53430</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-10T18:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269552#M53432</link>
      <description>Still converts seconds to minutes.</description>
      <pubDate>Tue, 10 May 2016 19:17:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269552#M53432</guid>
      <dc:creator>EarlyCode</dc:creator>
      <dc:date>2016-05-10T19:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Numeric data on timepart</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269553#M53433</link>
      <description>This works with fewer steps. Thank you,</description>
      <pubDate>Tue, 10 May 2016 19:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-Numeric-data-on-timepart/m-p/269553#M53433</guid>
      <dc:creator>EarlyCode</dc:creator>
      <dc:date>2016-05-10T19:18:05Z</dc:date>
    </item>
  </channel>
</rss>

