<?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 DI Studio Explicit pass-through convert oracle DATE type to SAS DATE in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Explicit-pass-through-convert-oracle-DATE-type-to-SAS/m-p/417855#M12744</link>
    <description>&lt;P&gt;I am using the Create Table transformation in DI Studio to extract data from an Oracle table to a SAS Data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Oracle DATE data type which I want stored in a SAS data set as a SAS date so that I can use the field in Visual Analytics as a normal SAS date variable for analytics/reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because I am using some User Defined Formats in the transformation sql I have to use Explicit Pass-Through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current understanding is that I would need to use the Oracle To_Char(&amp;lt;date&amp;gt;) function to load the oracle date field in a SAS data set as a Character format since there is not DATE type in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I don't think that would allow me to use that variable as a date in VA to for instance filter the table for all dates in the last 30 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something here? Is there a method for storing an oracle DATE field as a SAS date if the DATE field is extracted using pass-through sql?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2017 20:59:12 GMT</pubDate>
    <dc:creator>gsmith</dc:creator>
    <dc:date>2017-12-01T20:59:12Z</dc:date>
    <item>
      <title>DI Studio Explicit pass-through convert oracle DATE type to SAS DATE</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Explicit-pass-through-convert-oracle-DATE-type-to-SAS/m-p/417855#M12744</link>
      <description>&lt;P&gt;I am using the Create Table transformation in DI Studio to extract data from an Oracle table to a SAS Data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Oracle DATE data type which I want stored in a SAS data set as a SAS date so that I can use the field in Visual Analytics as a normal SAS date variable for analytics/reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because I am using some User Defined Formats in the transformation sql I have to use Explicit Pass-Through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current understanding is that I would need to use the Oracle To_Char(&amp;lt;date&amp;gt;) function to load the oracle date field in a SAS data set as a Character format since there is not DATE type in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I don't think that would allow me to use that variable as a date in VA to for instance filter the table for all dates in the last 30 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something here? Is there a method for storing an oracle DATE field as a SAS date if the DATE field is extracted using pass-through sql?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 20:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Explicit-pass-through-convert-oracle-DATE-type-to-SAS/m-p/417855#M12744</guid>
      <dc:creator>gsmith</dc:creator>
      <dc:date>2017-12-01T20:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Explicit pass-through convert oracle DATE type to SAS DATE</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Explicit-pass-through-convert-oracle-DATE-type-to-SAS/m-p/417914#M12745</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/113201"&gt;@gsmith&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;SAS uses the numerical data type to store date and datetime values. A date value is the count of days since 1/1/1960, a datetime value is the count of seconds since 1/1/1960.&lt;/P&gt;
&lt;P&gt;You then use date or datetime formats in SAS to make these counts human readable as dates or datetimes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Oracle DATE field has a precision down to the second. If you load such an Oracle DATE field into SAS then the SAS/Access engine for Oracle will convert this Oracle DATE to a SAS DateTime value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can either use this SAS DateTime value for loading into VA or you can convert this value to a SAS Date value using the Datepart() function. If you convert to a SAS Date then also change the permanent format applied to the variable to something like DATE9. by using a FORMAT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the&amp;nbsp;relevant docu link:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=p06jk0u30uhuj5n18fqw9sxr25lk.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&amp;nbsp;" target="_blank"&gt;http://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=p06jk0u30uhuj5n18fqw9sxr25lk.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 01:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Explicit-pass-through-convert-oracle-DATE-type-to-SAS/m-p/417914#M12745</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-12-02T01:53:45Z</dc:date>
    </item>
  </channel>
</rss>

