<?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: Input function, informat  and format in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549115#M8613</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ttime $8.;
datalines;
09-05-21
10-56-34
15-23-47
;

data want;
   set have;
   ttime_num=input(ttime, time8.);
   format ttime_num time8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 07 Apr 2019 14:21:09 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-04-07T14:21:09Z</dc:date>
    <item>
      <title>Input function, informat  and format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549110#M8611</link>
      <description>&lt;P&gt;&lt;FONT&gt;There is a variable ttime&lt;FONT&gt; in character form&lt;/FONT&gt; in table A, which represents the transaction time. The content is as follows:&lt;SPAN&gt;&lt;BR /&gt;09-05-21&lt;BR /&gt;10-56&lt;FONT face="book antiqua,palatino"&gt;-34&lt;/FONT&gt;&lt;BR /&gt;15-23-47&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The digits separated are respectively hours, minutes, and seconds.&lt;/P&gt;&lt;P&gt;(1) Write the data stepthat converts ttime to a time variable.&lt;BR /&gt;(2)To see the value of the &lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;ttime in&lt;/SPAN&gt; time format, write the format statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 12:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549110#M8611</guid>
      <dc:creator>cx2019</dc:creator>
      <dc:date>2019-04-07T12:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Input function, informat  and format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549113#M8612</link>
      <description>&lt;P&gt;Please show us the code that you have tried.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 13:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549113#M8612</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-07T13:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Input function, informat  and format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549115#M8613</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ttime $8.;
datalines;
09-05-21
10-56-34
15-23-47
;

data want;
   set have;
   ttime_num=input(ttime, time8.);
   format ttime_num time8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Apr 2019 14:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549115#M8613</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-04-07T14:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Input function, informat  and format</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549116#M8614</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want (keep=time_var);
input ttime $;
time_var=input(ttime,time9.);
format time_var time9.;
datalines;
09-05-21
10-56-34
15-23-47
;
run;

or 


data want (keep=time_var);
input ttime $;
new_var_time=tranwrd(ttime,'-',":");
time_var=input(new_var_time,time9.);
format time_var time9.;
datalines;
09-05-21
10-56-34
15-23-47
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Apr 2019 14:33:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-function-informat-and-format/m-p/549116#M8614</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2019-04-07T14:33:08Z</dc:date>
    </item>
  </channel>
</rss>

