<?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 format changing while processing SAS file to oracle Sql in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302906#M8582</link>
    <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p1b9d1kbo0czoxn1ouj1kcxwqzn1.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p1b9d1kbo0czoxn1ouj1kcxwqzn1.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 11:22:31 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-10-06T11:22:31Z</dc:date>
    <item>
      <title>Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302887#M8574</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a SAS data set with variable "Date" and having format mmddyy8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when i set the SAS data set and create new data set on&amp;nbsp;Oracle SQL &amp;nbsp;my date is changing to 1/1/1960 15:00:00 [basically to datetime20. format].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to fix this please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ganesh K&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 09:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302887#M8574</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T09:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302895#M8575</link>
      <description>&lt;P&gt;Look in the documentation of data type mapping:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/acreldb/69039/HTML/default/viewer.htm#p06jk0u30uhuj5n18fqw9sxr25lk.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/acreldb/69039/HTML/default/viewer.htm#p06jk0u30uhuj5n18fqw9sxr25lk.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 10:27:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302895#M8575</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-10-06T10:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302896#M8576</link>
      <description>&lt;P&gt;Hi Linush,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually in SAS Data i have date 05/25/2016&lt;/P&gt;
&lt;P&gt;When i create SQL data i got date 1/1/1960 15:30:00&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My date format was changed.&amp;nbsp;I used Format to make chages while creation of&amp;nbsp;SQL data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing is changing my date. so could you please guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ganesh K&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 10:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302896#M8576</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T10:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302897#M8577</link>
      <description>&lt;P&gt;You need to use the &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/69039/HTML/default/viewer.htm#p1dqaq7ub1cm1pn1ow3x9qkmkxe8.htm" target="_blank"&gt;DBTYPE=&lt;/A&gt; option.&lt;/P&gt;
&lt;P&gt;To quote from the link that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH﻿&lt;/a&gt; gave you:&lt;/P&gt;
&lt;P&gt;"To override these data types, use the DBTYPE= data set option during output processing."&lt;/P&gt;
&lt;P&gt;From the symptoms, your date is stored as a datetime value in Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another workaround would be to convert to datetime locally before you write to Oracle (just multiply the value by 86400, or use the dhms() function)&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 10:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302897#M8577</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-06T10:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302901#M8578</link>
      <description>&lt;P&gt;Hi kurtBremser,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Multiple by value 86400 worked for me. since i am using SAS 9.3 version. Is there any other method?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ganesh K&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:13:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302901#M8578</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T11:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302902#M8579</link>
      <description>&lt;P&gt;Convert to datetime using DHMS function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ude DBTYPE option as indicated to have it handle conversion.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example 3&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302902#M8579</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-06T11:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302903#M8580</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17945"&gt;@Ganeshk&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi kurtBremser,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Multiple by value 86400 worked for me. since i am using SAS 9.3 version. Is there any other method?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ganesh K&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As I said, use the dhms() function.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302903#M8580</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-06T11:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302904#M8581</link>
      <description>&lt;P&gt;Any example on&amp;nbsp;&lt;SPAN&gt; dhms() function, how to use it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302904#M8581</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T11:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302906#M8582</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p1b9d1kbo0czoxn1ouj1kcxwqzn1.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p1b9d1kbo0czoxn1ouj1kcxwqzn1.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302906#M8582</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-06T11:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302909#M8583</link>
      <description>&lt;P&gt;Assign a format of DATE9. to the SAS variable. I believe if that's done then the SAS/Access to Oracle engine gets it and converts your SAS date value correctly to a Oracle DATE value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:27:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302909#M8583</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-06T11:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302912#M8584</link>
      <description>&lt;P&gt;Actually i have a variable date in that case how to use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="tgroup"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalBottom"&gt;
&lt;DIV id="n0hh4bq5xfeh28n13t2rw35du8fa" class="xis-paraTableFirst"&gt;
&lt;PRE class="xis-codeFragment"&gt;sasdt=dhms(day, 0, 0, time);
put sasdt datetime.;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalBottom"&gt;
&lt;DIV id="p0gxnk9jatii5rn1dd5unqut3mrx" class="xis-paraTableFirst"&gt;
&lt;PRE class="xis-codeFragment"&gt;02APR03:15:05:02&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302912#M8584</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T11:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302915#M8585</link>
      <description>&lt;PRE class="xis-codeFragment"&gt;sasdt=dhms(day, 0, 0, time);&lt;BR /&gt;format sasdt datetime21.;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302915#M8585</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-06T11:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302916#M8586</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17945"&gt;@Ganeshk&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Actually i have a variable date in that case how to use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="tgroup"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalBottom"&gt;
&lt;DIV id="n0hh4bq5xfeh28n13t2rw35du8fa" class="xis-paraTableFirst"&gt;
&lt;PRE class="xis-codeFragment"&gt;sasdt=dhms(day, 0, 0, time);
put sasdt datetime.;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalBottom"&gt;
&lt;DIV id="p0gxnk9jatii5rn1dd5unqut3mrx" class="xis-paraTableFirst"&gt;
&lt;PRE class="xis-codeFragment"&gt;02APR03:15:05:02&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The first parameter for the dhms() function is not a day, but a SAS date:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
sasdt = dhms(date(),0,0,0);
format sasdt datetime19.;
put sasdt=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt;16         data _null_;
17         sasdt = dhms(date(),0,0,0);
18         format sasdt datetime19.;
19         put sasdt=;
20         run;

sasdt=06OCT2016:00:00:00
&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302916#M8586</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-06T11:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302917#M8587</link>
      <description>&lt;P&gt;Thanks for quick response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data oracle.Tab1;&lt;/P&gt;
&lt;P&gt;Set Tab2;&lt;/P&gt;
&lt;P&gt;Response_Date=Dhms(Date(),0,0,0);&lt;/P&gt;
&lt;P&gt;Post_Date=&lt;SPAN&gt;Dhms(Date(),0,0,0);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Fromat&amp;nbsp;&lt;SPAN&gt;Response_Date datetime19.;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Fromat &lt;SPAN&gt;Post_Date&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;datetime19.;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Put&amp;nbsp;Response_Date=;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Put Post_Date=;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Gives todays date. What can be done to modify. My existing variable name are&amp;nbsp;Response_Date and&amp;nbsp;Post_Date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302917#M8587</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T11:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302927#M8588</link>
      <description>&lt;P&gt;Have you tried replacing date() with your variable name for starters?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 12:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302927#M8588</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-06T12:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302933#M8589</link>
      <description>&lt;P&gt;Thanks Reeza. Actually this result of date is perfect.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 13:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/302933#M8589</guid>
      <dc:creator>Ganeshk</dc:creator>
      <dc:date>2016-10-06T13:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date format changing while processing SAS file to oracle Sql</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/303077#M8599</link>
      <description>&lt;P&gt;It's imho a flaw that the SAS/Access to Oracle engine doesn't recognize all the OOTB SAS Date and DateTime formats but if you use Date. and Datetime. then things will just work implicitely without any extra options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've just run below code which loads a SAS Date and DateTime value into Oracle (creating a new table in Oracle) and things just work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.SAS_table;
  format SAS_Date_var date9. SAS_DateTime_var datetime21.;
  SAS_Date_var=today();
  SAS_DateTime_var=datetime();
run;

proc append data=work.SAS_table base=ora.Oracle_Table;
run;quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That's how the Oracle table then looks like from the SAS side:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5187iFCEFB4E191A773C6/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here from the Oracle side via SQL Developer&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5184i386AB0DB0D81BE4D/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5185i078C28DEBF9F1929/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 07:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Date-format-changing-while-processing-SAS-file-to-oracle-Sql/m-p/303077#M8599</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-07T07:48:49Z</dc:date>
    </item>
  </channel>
</rss>

