<?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 Write Date from SAS to Oracle in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632785#M187630</link>
    <description>&lt;P&gt;For some reason when I try to write this SAS table to and Oracle table of time date the date in the oracle table shows 1960.&amp;nbsp; I know I'm missing something simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
create table test1
(academic_period_time date);
quit;

proc sql;
insert into test1(academic_period_time)
values('05MAY2023'D,);
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 20:29:14 GMT</pubDate>
    <dc:creator>DavidPhillips2</dc:creator>
    <dc:date>2020-03-17T20:29:14Z</dc:date>
    <item>
      <title>Write Date from SAS to Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632785#M187630</link>
      <description>&lt;P&gt;For some reason when I try to write this SAS table to and Oracle table of time date the date in the oracle table shows 1960.&amp;nbsp; I know I'm missing something simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
create table test1
(academic_period_time date);
quit;

proc sql;
insert into test1(academic_period_time)
values('05MAY2023'D,);
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 20:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632785#M187630</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2020-03-17T20:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Write Date from SAS to Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632786#M187631</link>
      <description>&lt;P&gt;Oracle stores datetimes, not dates.&lt;/P&gt;
&lt;P&gt;SAS should translate for you, but seems not to here.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;insert into test1(academic_period_time) values('05MAY2023:0:0'dt);&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2020 20:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632786#M187631</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-17T20:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Write Date from SAS to Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632787#M187632</link>
      <description>&lt;P&gt;Yes. You are missing the fact that Oracle does not actual have a DATE data type.&amp;nbsp; It only has DATETIME.&amp;nbsp; Any reasonable number of days will look like some time early in the morning of January first 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would work better to just use SAS code to add data, but if you want to use the SQL INSERT statement then give it a datetime value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;values('05MAY2023:00:00'DT)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 20:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-Date-from-SAS-to-Oracle/m-p/632787#M187632</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-17T20:34:01Z</dc:date>
    </item>
  </channel>
</rss>

