<?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 How to simplify date&amp;time in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200007#M49948</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a question about SAS basic procedure, how to convert time like "2014-03-17 16:58:39.512986+0000" to a time only with day(month), hour and minute. Like "03-17 16:58"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2015 23:03:28 GMT</pubDate>
    <dc:creator>Crubal</dc:creator>
    <dc:date>2015-07-09T23:03:28Z</dc:date>
    <item>
      <title>How to simplify date&amp;time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200007#M49948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a question about SAS basic procedure, how to convert time like "2014-03-17 16:58:39.512986+0000" to a time only with day(month), hour and minute. Like "03-17 16:58"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 23:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200007#M49948</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2015-07-09T23:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to simplify date&amp;time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200008#M49949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HoHo. You are luck you have SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;H3&gt;Code: Program&lt;/H3&gt;&lt;PRE class="sce-render" style="font-family: 'Courier New', Menlo, 'Lucida Console'; font-size: 16px;"&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;picture&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;fmt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;other&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'%0m-%0d %0H:%0M'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;datatype&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;datetime&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;x&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;a&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;"2014-03-17 16:58:39.512986+0000"&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;b&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;input&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;scan&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;a&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="numeric" style="color: #008080; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'.'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="format" style="color: #008080;"&gt;anydtdtm24.&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;b&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="format" style="color: #008080;"&gt;fmt12.&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;Log: Program&lt;/H3&gt;&lt;P&gt;Notes (7)&lt;/P&gt;&lt;DIV class="sasSource" style="color: #000000;"&gt; 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;P&gt;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 53&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 54 proc format;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 55 picture fmt&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 56 other='%0m-%0d %0H:%0M'(datatype=datetime);&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote1_1436533209414" style="color: #0000ff;"&gt; NOTE: Format FMT is already on the library WORK.FORMATS.&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote2_1436533209414" style="color: #0000ff;"&gt; NOTE: Format FMT has been output.&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 57 run;&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote3_1436533209414" style="color: #0000ff;"&gt; NOTE: PROCEDURE FORMAT used (Total process time):&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; real time 0.02 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; cpu time 0.01 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 58 data x;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 59 a="2014-03-17 16:58:39.512986+0000";&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 60 b=input(scan(a,1,'.'),anydtdtm24.);&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 61 format b fmt12.;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 62 run;&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote4_1436533209414" style="color: #0000ff;"&gt; NOTE: The data set WORK.X has 1 observations and 2 variables.&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote5_1436533209414" style="color: #0000ff;"&gt; NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; real time 0.00 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; cpu time 0.00 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 63 proc print;run;&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote6_1436533209414" style="color: #0000ff;"&gt; NOTE: There were 1 observations read from the data set WORK.X.&lt;/P&gt;&lt;P class="sasNote" id="sasLogNote7_1436533209414" style="color: #0000ff;"&gt; NOTE: PROCEDURE PRINT used (Total process time):&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; real time 0.03 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp; cpu time 0.02 seconds&lt;/P&gt;&lt;P class="sasNote" style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 64&amp;nbsp; &lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 65 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/P&gt;&lt;P class="sasSource" style="color: #000000;"&gt; 75&amp;nbsp; &lt;/P&gt;&lt;/DIV&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;Results: Program&lt;/H3&gt;&lt;DIV class="ods_a16a6371-1c82-4626-b5cd-16c8946a69ec" id="div_a16a6371-1c82-4626-b5cd-16c8946a69ec"&gt;&lt;DIV class="c body" id="div_a16a6371-1c82-4626-b5cd-16c8946a69ec" style="margin: 1em 8px; font-size: x-small; text-align: center; color: #000000; font-family: Arial, 'Albany AMT', Helvetica, Helv; background-color: #fafbfe;"&gt;&lt;TABLE class="table" style="margin-bottom: 1em; border-style: solid; border-width: 1px 0px 0px 1px; border-color: #c1c1c1; margin-left: auto; margin-right: auto;"&gt;&lt;TBODY&gt;&lt;TR style="border-top-width: 1px; border-top-color: #c1c1c1; border-bottom-color: #c1c1c1;"&gt;&lt;TH class="r rowheader" scope="row" style="text-align: right; padding: 3px 6px; border-color: #b0b7bb; border-style: solid; border-width: 0px 1px 1px 0px; color: #112277; font-weight: bold; background-color: #edf2f9;"&gt;1&lt;/TH&gt;&lt;TD class="data" style="text-align: left; padding: 3px 6px; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; background-color: #ffffff;"&gt;2014-03-17 16:58:39.512986+0000&lt;/TD&gt;&lt;TD class="r data" style="text-align: right; padding: 3px 6px; border-color: #c1c1c1; border-style: solid; border-width: 0px 1px 1px 0px; background-color: #ffffff;"&gt;03-17 16:58&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 13:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200008#M49949</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-07-10T13:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to simplify date&amp;time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200009#M49950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its just character you want (and should still sort correctly:&lt;/P&gt;&lt;P&gt;new_var=substr(dt,6,11);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 13:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-simplify-date-time/m-p/200009#M49950</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-10T13:38:25Z</dc:date>
    </item>
  </channel>
</rss>

