<?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: Timevar format issue in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17533#M3333</link>
    <description>Hi, &lt;BR /&gt;
To convert a character string to a numeric variable you would use an assignment statement, something like:&lt;BR /&gt;
[pre]&lt;BR /&gt;
numvar = input(charvar,informat_name.);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
if your character string is in a date or date time form, then you would need to look up the correct INformat in the documentation. BEST12 would NOT be the correct INformat to use.&lt;BR /&gt;
&lt;BR /&gt;
Cynthia</description>
    <pubDate>Thu, 06 May 2010 21:29:01 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-05-06T21:29:01Z</dc:date>
    <item>
      <title>Timevar format issue</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17532#M3332</link>
      <description>This is the timevar as it currently reads: 2009-03-24T09:00 it is considered character format $200.&lt;BR /&gt;
&lt;BR /&gt;
by a simple recoding I can get: 200903240900  Best12. format&lt;BR /&gt;
&lt;BR /&gt;
I would like to have this in timedate format or be able to split it into the time and date seperately.&lt;BR /&gt;
&lt;BR /&gt;
(the dataset was imported from a seperate comapny I did not create it)&lt;BR /&gt;
&lt;BR /&gt;
Any help or insight would be wonderful! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 06 May 2010 21:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17532#M3332</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-06T21:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Timevar format issue</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17533#M3333</link>
      <description>Hi, &lt;BR /&gt;
To convert a character string to a numeric variable you would use an assignment statement, something like:&lt;BR /&gt;
[pre]&lt;BR /&gt;
numvar = input(charvar,informat_name.);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
if your character string is in a date or date time form, then you would need to look up the correct INformat in the documentation. BEST12 would NOT be the correct INformat to use.&lt;BR /&gt;
&lt;BR /&gt;
Cynthia</description>
      <pubDate>Thu, 06 May 2010 21:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17533#M3333</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-06T21:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Timevar format issue</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17534#M3334</link>
      <description>Recommended Google advanced search argument for this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
sas datetime values site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Also, there are SAS functions DATEPART and TIMEPART, if you want to split a DATETIME variable.  And, as Cynthia mentioned, it's key to apply the proper SAS format as you desire the output to be displayed, since SAS DATE and DATETIME variables are numeric internally, as can be picked-up from the DOC references.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 07 May 2010 00:40:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17534#M3334</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-07T00:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Timevar format issue</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17535#M3335</link>
      <description>there are informats like IS8601xx  (in SAS9) which I think are designed to handle these types of date and time data formats.&lt;BR /&gt;
There is also ANYDTDTM informat which would search for a suitable datetime informat. It gave me these results (SAS9.1.3 sp4)&lt;BR /&gt;
436  %put %sysfunc( inputn( %str(2009-03-24T09:00), anydtdtm), datetime );&lt;BR /&gt;
.&lt;BR /&gt;
437  %put %sysfunc( inputn( %str(2009-03-24T09:00:00), anydtdtm), datetime );&lt;BR /&gt;
24MAR09:09:00:00&lt;BR /&gt;
&lt;BR /&gt;
This shows that the informat ANYDTDTM expects the seconds to be provided.&lt;BR /&gt;
So does IS8601DT.</description>
      <pubDate>Mon, 10 May 2010 13:57:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Timevar-format-issue/m-p/17535#M3335</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-05-10T13:57:23Z</dc:date>
    </item>
  </channel>
</rss>

