<?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 column has inconsistencies across values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819743#M323570</link>
    <description>&lt;P&gt;Did you un-format the SAS dates? It doesn't appear that you did this.&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>Wed, 22 Jun 2022 17:29:01 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-06-22T17:29:01Z</dc:date>
    <item>
      <title>Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819717#M323561</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a date column which is showing correct values in all the rows in a SAS dataset. But when I am loading the same dataset to Netezza database just few say 20 out of 200 values are showing date of&amp;nbsp;1/1/1960 rest column shows same dates as we have in the SAS dataset. we are using the same format of the column in SAS and Netezza. please advise&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;kajal&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 16:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819717#M323561</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-22T16:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819724#M323566</link>
      <description>&lt;P&gt;Show us what you are seeing in SAS for some of these 20 rows that aren't showing properly, and also for a few rows that are showing properly. We need to see the unformatted values. You can un-format something simply by using this command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format variablename;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then show us the same rows as they appear in Netezza.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the "Insert Photos" icons to include your screen captures in your reply.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 16:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819724#M323566</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-22T16:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819731#M323567</link>
      <description>&lt;P&gt;So '01JAN1960'd is represented by the number zero in SAS.&lt;/P&gt;
&lt;P&gt;Did you do something to convert missing values into zeros?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also SAS stores dates as number of days since 1960 and datetime as number of seconds since 1960.&amp;nbsp; If you use DATE format with date values and DTDATE format with datetime values they will look in the output like the same thing, but actually contain wildly different values.&amp;nbsp; &amp;nbsp;So if you accidentally tried to load a DATE value (number of days) into a variable that is using DATETIME values (number of seconds) it will appear as some time early in the first day of Jan 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run PROC CONTENTS on your SAS dataset and check the TYPE of the variables (numeric or character) and check what format (if any) is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;185  data test;
186    now=datetime();
187    today=date();
188    put 'As raw numbers -&amp;gt; ' (now today) (=comma20.);
189    put 'As DATE values -&amp;gt; ' (now today) (=date9.);
190    put 'As DATETIME    -&amp;gt; ' (now today) (=datetime19.);
191  run;

As raw numbers -&amp;gt; now=1,971,522,499 today=22,818
As DATE values -&amp;gt; now=********* today=22JUN2022
As DATETIME    -&amp;gt; now=22JUN2022:13:08:19 today=01JAN1960:06:20:18
&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2022 17:10:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819731#M323567</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-06-22T17:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819738#M323568</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Columns.PNG" style="width: 591px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72576i678A9721090EB4E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Columns.PNG" alt="Columns.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="netezza.PNG" style="width: 252px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72574iEEBC831A2F144CF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="netezza.PNG" alt="netezza.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.PNG" style="width: 782px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72575iE62DC50E4158AB6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas.PNG" alt="sas.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 17:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819738#M323568</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-22T17:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819740#M323569</link>
      <description>&lt;P&gt;Hi Tom the values showing 1/1/1960 are actually not null values in the source they have valid date value.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 17:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819740#M323569</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-22T17:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819743#M323570</link>
      <description>&lt;P&gt;Did you un-format the SAS dates? It doesn't appear that you did this.&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>Wed, 22 Jun 2022 17:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819743#M323570</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-22T17:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819753#M323573</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="unformat.PNG" style="width: 423px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72577i7C0406909A49C960/image-size/large?v=v2&amp;amp;px=999" role="button" title="unformat.PNG" alt="unformat.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 17:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819753#M323573</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-22T17:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819754#M323574</link>
      <description>&lt;P&gt;Thank you. Now show us the code you used to send this to Netezza.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 17:56:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819754#M323574</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-22T17:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date column has inconsistencies across values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819787#M323577</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;to make the comparison easier. Create small sample of the data that has the issue, say 20 records.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show a screenshot of those twenty dates in SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then show the screenshot in Netezza and include the code used as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Screenshots of different records that don't necessarily align won't help resolve the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is called generating a reproducible example to illustrate a problem and is generally how you go about debugging any coding issues. About 80% of the time when going through this process you'll figure out where the error is before posting if you follow the process.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/help/minimal-reproducible-example" target="_blank"&gt;https://stackoverflow.com/help/minimal-reproducible-example&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 18:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-column-has-inconsistencies-across-values/m-p/819787#M323577</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-06-22T18:37:53Z</dc:date>
    </item>
  </channel>
</rss>

