<?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: Setting a date value in a SAS job that runs on Netezza in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Setting-a-date-value-in-a-SAS-job-that-runs-on-Netezza/m-p/461970#M284868</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33000"&gt;@EinarRoed&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;TO_DATE() will work for explicit pass-through.&lt;/P&gt;
&lt;P&gt;If you're using SAS SQL (implicit pass-through) then use for missing dates an expression like '01JAN1900'd and make sure that the variable you assign this value to has a format of date9. assigned - any date. format actually; just something which tells the SAS/Access engine that the SAS numeric variable contains a SAS Datetime value so it gets converted correctly to a Netezza DATE value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have datetime values on the SAS side then use '01JAN1900 00:00:00'dt and a format of datetime21.&lt;/P&gt;</description>
    <pubDate>Mon, 14 May 2018 10:48:35 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-05-14T10:48:35Z</dc:date>
    <item>
      <title>Setting a date value in a SAS job that runs on Netezza</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-a-date-value-in-a-SAS-job-that-runs-on-Netezza/m-p/461966#M284867</link>
      <description>&lt;P&gt;We're optimizing a SAS DI Studio job so that it runs 100% on Netezza.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Netezza doesn't seem to tolerate NULL in DATE variables however. It also doesn't tolerate it if we set the date variable to '.'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We've decided to enter a dummy date instead. It should be set to 01JAN1900 (in a SAS numeric DATE9 variable).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know how I can set this date in a way that Netezza accepts? I've tried the TO_DATE() expression, but it doesn't work in a numeric variable.&amp;nbsp;Can't convert it using INPUT() either.&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 10:04:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-a-date-value-in-a-SAS-job-that-runs-on-Netezza/m-p/461966#M284867</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2018-05-14T10:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a date value in a SAS job that runs on Netezza</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Setting-a-date-value-in-a-SAS-job-that-runs-on-Netezza/m-p/461970#M284868</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33000"&gt;@EinarRoed&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;TO_DATE() will work for explicit pass-through.&lt;/P&gt;
&lt;P&gt;If you're using SAS SQL (implicit pass-through) then use for missing dates an expression like '01JAN1900'd and make sure that the variable you assign this value to has a format of date9. assigned - any date. format actually; just something which tells the SAS/Access engine that the SAS numeric variable contains a SAS Datetime value so it gets converted correctly to a Netezza DATE value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have datetime values on the SAS side then use '01JAN1900 00:00:00'dt and a format of datetime21.&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 10:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Setting-a-date-value-in-a-SAS-job-that-runs-on-Netezza/m-p/461970#M284868</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-05-14T10:48:35Z</dc:date>
    </item>
  </channel>
</rss>

