<?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 Truncated Date in dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822167#M324637</link>
    <description>&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table test as&lt;/P&gt;
&lt;P&gt;select loan.data_date as as_of_date&lt;/P&gt;
&lt;P&gt;from have&lt;/P&gt;
&lt;P&gt;;quit;&lt;/P&gt;
&lt;P&gt;output looks like this&lt;/P&gt;
&lt;P&gt;as_of_date&lt;BR /&gt;************&lt;/P&gt;
&lt;P&gt;In other words the date has a date type variable however its truncated and not showing the actual date.&amp;nbsp; I tried using to_date(loan.data_date as as_of_date) however I ger t function not present when using this.&amp;nbsp; How can I get the actual date to avoid truncation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 21:35:30 GMT</pubDate>
    <dc:creator>Q1983</dc:creator>
    <dc:date>2022-07-07T21:35:30Z</dc:date>
    <item>
      <title>Truncated Date in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822167#M324637</link>
      <description>&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table test as&lt;/P&gt;
&lt;P&gt;select loan.data_date as as_of_date&lt;/P&gt;
&lt;P&gt;from have&lt;/P&gt;
&lt;P&gt;;quit;&lt;/P&gt;
&lt;P&gt;output looks like this&lt;/P&gt;
&lt;P&gt;as_of_date&lt;BR /&gt;************&lt;/P&gt;
&lt;P&gt;In other words the date has a date type variable however its truncated and not showing the actual date.&amp;nbsp; I tried using to_date(loan.data_date as as_of_date) however I ger t function not present when using this.&amp;nbsp; How can I get the actual date to avoid truncation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 21:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822167#M324637</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2022-07-07T21:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Truncated Date in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822168#M324638</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5629"&gt;@Q1983&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output looks like this&lt;/P&gt;
&lt;P&gt;as_of_date&lt;BR /&gt;************&lt;/P&gt;
&lt;P&gt;In other words the date has a date type variable however its truncated and not showing the actual date.&amp;nbsp; I tried using to_date(loan.data_date as as_of_date) however I ger t function not present when using this.&amp;nbsp; How can I get the actual date to avoid truncation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Where are you looking to see these ********* values? Please be specific. Or show us a screen capture (use the "Insert Photos" icon to include your screen capture in your reply; do not attach files).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, what is the format assigned to the variable AS_OF_DATE according to PROC CONTENTS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, there is no TO_DATE function in SAS PROC SQL. (Some SAS PROC SQL code might use TO_DATE if it passes thru to a database such as Oracle that does have the TO_DATE function). What operation you are trying to do with this function?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 21:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822168#M324638</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-07-07T21:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Truncated Date in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822176#M324640</link>
      <description>&lt;P&gt;One reason could be the format applied. Try if below helps&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table test as
select loan.data_date as as_of_date format=datetime21.
from have
;quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Should the dates then all show year 1960 then try format=date9. instead.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 23:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822176#M324640</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-07-07T23:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Truncated Date in dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822208#M324657</link>
      <description>&lt;P&gt;This can not be the code that created the dataset, as it won't run (alias loan does not exist). Please post the complete, unchanged log from your&amp;nbsp;&lt;EM&gt;real&lt;/EM&gt; code.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 05:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncated-Date-in-dataset/m-p/822208#M324657</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-08T05:23:38Z</dc:date>
    </item>
  </channel>
</rss>

