<?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: readable datetime format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342641#M78565</link>
    <description>&lt;P&gt;I can't answer your question, but I really like your code snippet! I printed it out and posted it at my desk.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2017 15:27:48 GMT</pubDate>
    <dc:creator>sschleede</dc:creator>
    <dc:date>2017-03-20T15:27:48Z</dc:date>
    <item>
      <title>readable datetime format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342615#M78561</link>
      <description>&lt;P&gt;All existing SAS datetime formats, as for as I know, is not easy for me to read.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Such as &lt;SPAN&gt;1447213759&amp;nbsp;&lt;/SPAN&gt;datetime with datetime21.2 format will be shown as 10NOV2005:03:49:19.00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have to define a new format as below to make it looks like 2005-11-10 03:49:19.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC FORMAT;&lt;BR /&gt;picture MyDT&amp;nbsp;other='%0Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime);&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I will have to define the format in all my sas codes, otherwise, the dataset I created with this format will not be shown correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really want to know why SAS does not create a more readable datetime format like the one above.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342615#M78561</guid>
      <dc:creator>jjjch</dc:creator>
      <dc:date>2017-03-20T14:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: readable datetime format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342641#M78565</link>
      <description>&lt;P&gt;I can't answer your question, but I really like your code snippet! I printed it out and posted it at my desk.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342641#M78565</guid>
      <dc:creator>sschleede</dc:creator>
      <dc:date>2017-03-20T15:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: readable datetime format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342644#M78568</link>
      <description>&lt;P&gt;Look at the E8601 family of formats, they implement the &lt;A href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank"&gt;ISO 8601 norm&lt;/A&gt;.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/110541"&gt;@jjjch&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;All existing SAS datetime formats, as for as I know, is not easy for me to read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Such as &lt;SPAN&gt;1447213759&amp;nbsp;&lt;/SPAN&gt;datetime with datetime21.2 format will be shown as 10NOV2005:03:49:19.00.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I have to define a new format as below to make it looks like 2005-11-10 03:49:19.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FORMAT;&lt;BR /&gt;picture MyDT&amp;nbsp;other='%0Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime);&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I will have to define the format in all my sas codes, otherwise, the dataset I created with this format will not be shown correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really want to know why SAS does not create a more readable datetime format like the one above.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342644#M78568</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-20T15:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: readable datetime format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342652#M78570</link>
      <description>&lt;P&gt;Put the Format in a permanent library and then have that library in the format search path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or put the code into the autoexec.sas so it is available in every session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/readable-datetime-format/m-p/342652#M78570</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-20T15:46:07Z</dc:date>
    </item>
  </channel>
</rss>

