<?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: How to remove the seconds from datetime20 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351892#M81969</link>
    <description>&lt;P&gt;Do you want to actually remove the seconds or just not display them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data junk;
   x='13apr2017:00:00:02'dt;
   y= round(x,60);/* changes the value*/
   put y= datetime20. ;
  /* or just use a different format to suppress display of the seconds*/
   put x= datetime13.; 
run;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Apr 2017 19:55:02 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-04-20T19:55:02Z</dc:date>
    <item>
      <title>How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351888#M81966</link>
      <description>I have a col name create which is a datetime20&lt;BR /&gt;The data looks like this 13apr2017:00:00:02&lt;BR /&gt;I need the data to look like this&lt;BR /&gt;13apr2017:00:00&lt;BR /&gt;Thanks for assistance</description>
      <pubDate>Thu, 20 Apr 2017 19:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351888#M81966</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-04-20T19:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351892#M81969</link>
      <description>&lt;P&gt;Do you want to actually remove the seconds or just not display them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data junk;
   x='13apr2017:00:00:02'dt;
   y= round(x,60);/* changes the value*/
   put y= datetime20. ;
  /* or just use a different format to suppress display of the seconds*/
   put x= datetime13.; 
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2017 19:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351892#M81969</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-20T19:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351912#M81977</link>
      <description>Hi I need to remove them</description>
      <pubDate>Thu, 20 Apr 2017 20:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351912#M81977</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-04-20T20:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351938#M81995</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/117620"&gt;@Gil_&lt;/a&gt; wrote:&lt;BR /&gt;Hi I need to remove them&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The use the Round in the example. Since datetime values are actually numbers of seconds rounding to the nearest multiple of 60 rounds to the nearest minute.&lt;/P&gt;
&lt;P&gt;Of if you want to truncate to the minute regardless of the number of seconds you could use INTNX:&lt;/P&gt;
&lt;PRE&gt;data _null_;
   x='05Apr2017:12:15:22'dt;
   x = intnx('minute',x,0,'b');
   put x datetime20.;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2017 22:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351938#M81995</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-20T22:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351940#M81997</link>
      <description>In the log it shows the sec removed but when I open table x=1807660800. How can I show datetime20?</description>
      <pubDate>Thu, 20 Apr 2017 22:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351940#M81997</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-04-20T22:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351979#M82014</link>
      <description>&lt;PRE&gt;data TEST;
   x='05Apr2017:12:15:22'dt;
   x = intnx('minute',x,0,'b');
   format x datetime20.;
   put x=;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Apr 2017 02:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/351979#M82014</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-04-21T02:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352215#M82069</link>
      <description>I'm getting an error message ... the table is located in a library named Ecms . When I refer the table I get this message&lt;BR /&gt;THE ORACLE TABLE CP_EVENT HAS BEEN OPENED FOR OUTPUT. THIS TABLE ALREADY EXISTS&lt;BR /&gt;OR THERE IS A NAME CONFLICT WITH AN EXISTING OBJECT. THIS TABLE WILL NOT BE REPLACED . THIS ENGINE DOES NOT SUPPORT REPLACE OPTION&lt;BR /&gt;&lt;BR /&gt;HERE IS THE SCRIPT&lt;BR /&gt;DATA ECMS.CP_EVENT;&lt;BR /&gt;Set ecms.cp_event;&lt;BR /&gt;X=create;&lt;BR /&gt;X=intnx ('minute',x,0,'b");&lt;BR /&gt;Put x datetime20.&lt;BR /&gt;Rum;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352215#M82069</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-04-21T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352246#M82079</link>
      <description>&lt;P&gt;Oracle unfortunately uses different behaviors and I don't work with Oracle so can't help there.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 17:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352246#M82079</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-21T17:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352250#M82083</link>
      <description>Ok thanks for assistance</description>
      <pubDate>Fri, 21 Apr 2017 17:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352250#M82083</guid>
      <dc:creator>Gil_</dc:creator>
      <dc:date>2017-04-21T17:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the seconds from datetime20</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352344#M82117</link>
      <description>You need to use proc sql and an update statement as you replacing in the same table</description>
      <pubDate>Fri, 21 Apr 2017 21:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-the-seconds-from-datetime20/m-p/352344#M82117</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-04-21T21:58:01Z</dc:date>
    </item>
  </channel>
</rss>

