<?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: Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580949#M34469</link>
    <description>&lt;P&gt;I did use FORCE in the proc append and the date still went in Oracle as 01JAN1960.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2019 20:11:34 GMT</pubDate>
    <dc:creator>nshTi62</dc:creator>
    <dc:date>2019-08-13T20:11:34Z</dc:date>
    <item>
      <title>Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580943#M34465</link>
      <description>&lt;P&gt;My date columns are showing in this format DDMONYYYY (ex. 08MAR2018) is showing&amp;nbsp;01JAN1960:06:00:23 in Oralce table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have try to add format=Date9. in the select statement to convert the date but it did not help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oracle :&lt;/P&gt;&lt;P&gt;Column: DUE_DATE&lt;/P&gt;&lt;P&gt;Date Type: Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS&lt;/P&gt;&lt;P&gt;Column: Due_Date&lt;/P&gt;&lt;P&gt;Date Type: Date9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;INSERT INTO admr.STAR_ACTION_ITEMS&lt;BR /&gt;(&lt;BR /&gt;NAME_ID,&lt;BR /&gt;DUE_DATE&lt;BR /&gt;)&lt;BR /&gt;Select&lt;BR /&gt;Name_ID,&lt;BR /&gt;Due_Date FORMAT=Date9.&lt;BR /&gt;FROM WORK.ACTION_ITEMS;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you format the date in SAS correctly so that it show the actual date in Oracle table?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 19:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580943#M34465</guid>
      <dc:creator>nshTi62</dc:creator>
      <dc:date>2019-08-13T19:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580944#M34466</link>
      <description>&lt;P&gt;If you by pass SAS's normal upload method then it can sometimes not realize it needs to convert dates into datetimes to insert into ORACLE.&amp;nbsp; You could convert the value yourself.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INSERT INTO admr.STAR_ACTION_ITEMS (NAME_ID,DUE_DATE)
Select
  Name_ID
, dhms(Due_Date,0,0,0)
FROM WORK.ACTION_ITEMS
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or try just using more natural SAS code to add the records.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append base=admr.STAR_ACTION_ITEMS data=WORK.ACTION_ITEMS;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And see if SAS is smart enough to transform the values for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 19:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580944#M34466</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-13T19:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580945#M34467</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token function"&gt;dhms&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;Due_Date&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;) worked but the Proc append didn't.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Thank you Tom&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580945#M34467</guid>
      <dc:creator>nshTi62</dc:creator>
      <dc:date>2019-08-13T20:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580948#M34468</link>
      <description>&lt;P&gt;Did PROC APPEND still load the number of days as if they were number of seconds?&lt;/P&gt;
&lt;P&gt;Or did it not execute?&amp;nbsp; Might need the FORCE option if the two datasets don't have the same variables.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580948#M34468</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-13T20:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580949#M34469</link>
      <description>&lt;P&gt;I did use FORCE in the proc append and the date still went in Oracle as 01JAN1960.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580949#M34469</guid>
      <dc:creator>nshTi62</dc:creator>
      <dc:date>2019-08-13T20:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date in format DDMONYYYY became 1/1/1960 after inserted into Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580951#M34470</link>
      <description>&lt;P&gt;Look at this page for how to use dataset options to tell SAS how to convert the variables for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001371624.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001371624.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-in-format-DDMONYYYY-became-1-1-1960-after-inserted-into/m-p/580951#M34470</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-13T20:16:30Z</dc:date>
    </item>
  </channel>
</rss>

