<?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 Remove the timestamp from the datetime field and update the timestamp with 00:00:00 in Pass thru SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-the-timestamp-from-the-datetime-field-and-update-the/m-p/827905#M327029</link>
    <description>&lt;P&gt;HI All, I am trying to update the format for only the timestamp and make it 00:00:00 without changing the date, Please can you suggest some formats I can try in the Pass through update I posted below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have -&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input bus_date datetime25.;&lt;BR /&gt;format bus_date datetime25.;&lt;BR /&gt;datalines;&lt;BR /&gt;25DEC2020:16:12:18&lt;BR /&gt;.&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want -&amp;nbsp;&lt;/P&gt;&lt;P&gt;bus_date&amp;nbsp;25DEC2020:00:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to oracle as myconn (user=smith password=secret&lt;BR /&gt;path='myoracleserver');&lt;/P&gt;&lt;P&gt;execute&lt;BR /&gt;(&lt;BR /&gt;update have&lt;BR /&gt;set&lt;BR /&gt;bus_date=???&lt;BR /&gt;where&lt;BR /&gt;STATUS = '0'&lt;BR /&gt;) by ORACLE;&lt;/P&gt;&lt;P&gt;disconnect from myconn;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2022 16:23:40 GMT</pubDate>
    <dc:creator>Anju</dc:creator>
    <dc:date>2022-08-09T16:23:40Z</dc:date>
    <item>
      <title>Remove the timestamp from the datetime field and update the timestamp with 00:00:00 in Pass thru SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-the-timestamp-from-the-datetime-field-and-update-the/m-p/827905#M327029</link>
      <description>&lt;P&gt;HI All, I am trying to update the format for only the timestamp and make it 00:00:00 without changing the date, Please can you suggest some formats I can try in the Pass through update I posted below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have -&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input bus_date datetime25.;&lt;BR /&gt;format bus_date datetime25.;&lt;BR /&gt;datalines;&lt;BR /&gt;25DEC2020:16:12:18&lt;BR /&gt;.&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want -&amp;nbsp;&lt;/P&gt;&lt;P&gt;bus_date&amp;nbsp;25DEC2020:00:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;connect to oracle as myconn (user=smith password=secret&lt;BR /&gt;path='myoracleserver');&lt;/P&gt;&lt;P&gt;execute&lt;BR /&gt;(&lt;BR /&gt;update have&lt;BR /&gt;set&lt;BR /&gt;bus_date=???&lt;BR /&gt;where&lt;BR /&gt;STATUS = '0'&lt;BR /&gt;) by ORACLE;&lt;/P&gt;&lt;P&gt;disconnect from myconn;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 16:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-the-timestamp-from-the-datetime-field-and-update-the/m-p/827905#M327029</guid>
      <dc:creator>Anju</dc:creator>
      <dc:date>2022-08-09T16:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the timestamp from the datetime field and update the timestamp with 00:00:00 in Pass thru</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-the-timestamp-from-the-datetime-field-and-update-the/m-p/827961#M327063</link>
      <description>&lt;P&gt;This is an Oracle question not SAS question since you're using SQL pass through the&amp;nbsp;&lt;BR /&gt;SQL needs to be Oracle compliant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the &lt;A href="https://stackoverflow.com/questions/8936767/sql-query-in-oracle-to-remove-the-time-or-set-it-to-default-000000-without-imp" target="_self"&gt;TRUNC() function&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;bus_date=trunc(bus_date)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31819"&gt;@Anju&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;HI All, I am trying to update the format for only the timestamp and make it 00:00:00 without changing the date, Please can you suggest some formats I can try in the Pass through update I posted below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input bus_date datetime25.;&lt;BR /&gt;format bus_date datetime25.;&lt;BR /&gt;datalines;&lt;BR /&gt;25DEC2020:16:12:18&lt;BR /&gt;.&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Want -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;bus_date&amp;nbsp;25DEC2020:00:00:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;connect to oracle as myconn (user=smith password=secret&lt;BR /&gt;path='myoracleserver');&lt;/P&gt;
&lt;P&gt;execute&lt;BR /&gt;(&lt;BR /&gt;update have&lt;BR /&gt;set&lt;BR /&gt;bus_date=???&lt;BR /&gt;where&lt;BR /&gt;STATUS = '0'&lt;BR /&gt;) by ORACLE;&lt;/P&gt;
&lt;P&gt;disconnect from myconn;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 19:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-the-timestamp-from-the-datetime-field-and-update-the/m-p/827961#M327063</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-08-09T19:51:50Z</dc:date>
    </item>
  </channel>
</rss>

