<?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: Read in date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526427#M143352</link>
    <description>&lt;P&gt;is this a formatting problem rather?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data w;
C_date='18/10/24';
date_new = input(C_date,anydtdte20.);
format date_new yymmdd8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Jan 2019 17:17:21 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-01-11T17:17:21Z</dc:date>
    <item>
      <title>Read in date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526422#M143351</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using 'C_date_new = input(C_date,anydtdte20.);' to read in a date variable (saved as text field) with date value of&amp;nbsp;'18/10/24', but after I read in, the date was converted to '2024-10-18', is there another way to read in the text date field and make the correct conversion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help and thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 17:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526422#M143351</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2019-01-11T17:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Read in date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526427#M143352</link>
      <description>&lt;P&gt;is this a formatting problem rather?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data w;
C_date='18/10/24';
date_new = input(C_date,anydtdte20.);
format date_new yymmdd8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jan 2019 17:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526427#M143352</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-11T17:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read in date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526428#M143353</link>
      <description>&lt;P&gt;And why aren't you using&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;date_new = input(C_date,yymmdd8.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jan 2019 17:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526428#M143353</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-11T17:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Read in date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526429#M143354</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219549"&gt;@zimcom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using 'C_date_new = input(C_date,anydtdte20.);' to read in a date variable (saved as text field) with date value of&amp;nbsp;'18/10/24', but after I read in, the date was converted to '2024-10-18', is there another way to read in the text date field and make the correct conversion?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate your help and thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are your values like '18/10/24' supposed to be YEAR Month Day? then you need to explicitly use a format that does that like yymmdds8.&lt;/P&gt;
&lt;P&gt;ANYDTDTE has to guess when there is not an explicit 4 digit year and will usually assume that a YEAR is the last value generally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And after the whole Y2K thing I have a lot of wonder why anyone is unsophisticated enough to start creating more issues by using two-digit years.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 17:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526429#M143354</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-11T17:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Read in date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526433#M143357</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 17:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-in-date/m-p/526433#M143357</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2019-01-11T17:31:30Z</dc:date>
    </item>
  </channel>
</rss>

