<?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 date format conversion in yyyy-mm-dd hh: mm: ss in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-conversion-in-yyyy-mm-dd-hh-mm-ss/m-p/335846#M22309</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am unable to convert below date format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"02/05/1992" to "1992-05-05 : 00:00:00"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;source is in string format and output should be in numeric format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Feb 2017 09:36:27 GMT</pubDate>
    <dc:creator>arpitagarwal512</dc:creator>
    <dc:date>2017-02-25T09:36:27Z</dc:date>
    <item>
      <title>date format conversion in yyyy-mm-dd hh: mm: ss</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-conversion-in-yyyy-mm-dd-hh-mm-ss/m-p/335846#M22309</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am unable to convert below date format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"02/05/1992" to "1992-05-05 : 00:00:00"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;source is in string format and output should be in numeric format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2017 09:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-conversion-in-yyyy-mm-dd-hh-mm-ss/m-p/335846#M22309</guid>
      <dc:creator>arpitagarwal512</dc:creator>
      <dc:date>2017-02-25T09:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: date format conversion in yyyy-mm-dd hh: mm: ss</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-conversion-in-yyyy-mm-dd-hh-mm-ss/m-p/335849#M22310</link>
      <description>&lt;P&gt;You're looking at a simnple two-step process:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Convert the string to a date&lt;/P&gt;
&lt;P&gt;2) Convert the date to a datetime&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can be done in a single line of code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;new_dt = dhms(input(date_str, ddmmyy10.), 0,0,0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now you have a datetime. But I do not know a predefined format for that so you may have to roll your own. Have a look at &lt;A href="http://support.sas.com/kb/24/621.html" target="_self"&gt;this&lt;/A&gt; how to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: This would be how to do the custom format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  picture mydt other='%0Y-%0m-%0d : %0H:%0M:%0S' (datatype=datetime);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2017 10:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/date-format-conversion-in-yyyy-mm-dd-hh-mm-ss/m-p/335849#M22310</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2017-02-25T10:29:01Z</dc:date>
    </item>
  </channel>
</rss>

