<?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: How to read 1/1/0001 date? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156602#M41061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you getting your data from Teradata to SAS? I assumed you were using SQL to query Teradata directly. If this is not the case please explain how you are doing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Sep 2014 20:12:27 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2014-09-23T20:12:27Z</dc:date>
    <item>
      <title>How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156598#M41057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAS experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am importing a file from teradata and I want to KEEP records with date 1/1/0001. (it appears as . in SAS)&lt;/P&gt;&lt;P&gt;It's basically a list of members with their departure dates. If a member is still alive, their departure_date will be 1/1/0001 in teradata (and . in SAS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following ways but to no avail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;departure_date = .&lt;/P&gt;&lt;P&gt;departure_date is null&lt;/P&gt;&lt;P&gt;departure_date = '01-01-0001'&lt;/P&gt;&lt;P&gt;departure_date = mdy(1,1,0001)&lt;/P&gt;&lt;P&gt;departure_date = '01JAN0001' &lt;/P&gt;&lt;P&gt;departure_date = '0001-01-01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any others I missed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 19:40:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156598#M41057</guid>
      <dc:creator>shixin</dc:creator>
      <dc:date>2014-09-23T19:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156599#M41058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am struggling to understand what the problem is here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a record has a date of . then it should be easy to identify and keep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 19:51:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156599#M41058</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-09-23T19:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156600#M41059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you try SQL passthru. That way you can reference the Teradata date explicitly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; connect to teradata (user=myusr1 pass=mypwd1 mode=teradata);&lt;/P&gt;&lt;P&gt;&amp;nbsp; create MyTable as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from connection to teradata&lt;/P&gt;&lt;P&gt; (select *&lt;/P&gt;&lt;P&gt;&amp;nbsp; from MyTeradataTable&lt;/P&gt;&lt;P&gt;&amp;nbsp; where departure_date = '1/1/0001'&lt;/P&gt;&lt;P&gt; );&lt;/P&gt;&lt;P&gt;disconnect from teradata;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 19:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156600#M41059</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-09-23T19:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156601#M41060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;It appears . in SAS because 1/1/0001 doesnt exists (3/3/2014 will appear as 3-3-2014 in SAS) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But when I use the filter &lt;EM style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;departure_date = .&lt;/EM&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; it generated 0 rows. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if I made myself clear.. hmm...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 19:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156601#M41060</guid>
      <dc:creator>shixin</dc:creator>
      <dc:date>2014-09-23T19:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156602#M41061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you getting your data from Teradata to SAS? I assumed you were using SQL to query Teradata directly. If this is not the case please explain how you are doing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 20:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156602#M41061</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-09-23T20:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156603#M41062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about just testing if it is really small? If you are doing this in SAS code then something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;departure_date &amp;lt; '01JAN1900'd&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 20:20:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156603#M41062</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-09-23T20:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156604#M41063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS date values aren't defined before around the year 1581 AD or 1582 IIRC due to changes in calendars.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What data do you have that you think you actually have something measured on January 1, 1 AD.? Or are you getting some default code from the source that really means, "we don't have a value but the database requires something at this is it", in which case SAS missing is quite appropriate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 21:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156604#M41063</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-09-23T21:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156605#M41064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the Gregorian calendar may not be seen valid as of year 1581 (or orthodox church today). Calendar system always are changing.&lt;/P&gt;&lt;P&gt;The mathematic numbering of days sas is using internally however will be correct. What is the goal?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 11:04:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156605#M41064</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-24T11:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156606#M41065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As stated by other, SQL pass-thru is the only feasible option here.&lt;/P&gt;&lt;P&gt;If you must perform this in SAS, have a view created in TD where the data column is casted to varchar. Could affect performance though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 11:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156606#M41065</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-09-24T11:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156607#M41066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further to the other suggestions, it might be worth confirming you can select data based on a more current date that you know exists. This should help confirm that there are no other issues at play here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 12:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156607#M41066</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2014-09-24T12:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to read 1/1/0001 date?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156608#M41067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Teradata gets filled from an other system. A data like this doe not make sense when it should be from something of these centuries. &lt;/P&gt;&lt;P&gt;Looks to be a data quality issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Teradata look at: &lt;A href="https://support.sas.com/resources/papers/teradata.pdf" title="https://support.sas.com/resources/papers/teradata.pdf"&gt;https://support.sas.com/resources/papers/teradata.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;with the datatypes chapter this conversion problem is described in the access interface. &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#n0v7nh4ylrihtin1te8xl0q3dvzv.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#n0v7nh4ylrihtin1te8xl0q3dvzv.htm"&gt;SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 13:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-read-1-1-0001-date/m-p/156608#M41067</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-24T13:22:18Z</dc:date>
    </item>
  </channel>
</rss>

