<?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: Two date formats in the same column, unifying date formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271685#M269502</link>
    <description>&lt;P&gt;Please try the below code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data want;
set have;
y=input(x,anydtdte10.);
format y yymmdd10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 19 May 2016 12:04:15 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2016-05-19T12:04:15Z</dc:date>
    <item>
      <title>Two date formats in the same column, unifying date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271682#M269501</link>
      <description>&lt;P&gt;Hi SAS Experts,&lt;/P&gt;
&lt;P&gt;I got bad data from the clients, some times the date in column X is formatted as 26.01.2016 sometimes as 2016-02-23.&lt;/P&gt;
&lt;P&gt;How can I create a SAS date column that unify's the format into yyyy-mm-dd?&lt;/P&gt;
&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12553i692686264CE15435/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="dates.png" title="dates.png" /&gt;</description>
      <pubDate>Thu, 19 May 2016 11:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271682#M269501</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2016-05-19T11:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Two date formats in the same column, unifying date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271685#M269502</link>
      <description>&lt;P&gt;Please try the below code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data want;
set have;
y=input(x,anydtdte10.);
format y yymmdd10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 May 2016 12:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271685#M269502</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-05-19T12:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Two date formats in the same column, unifying date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271690#M269503</link>
      <description>&lt;P&gt;Read the data into a character variable with length 10, and then input into your date variable; select the format according to the occurence of a dash in position 5.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have (rename=(L=old_L));
format L yymmddd10.;
if substr(old_L,5,1) = '-'
then L = input(old_L,yymmdd10.);
else L = input(old_L,ddmmyy10.);
drop old_L;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 May 2016 12:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271690#M269503</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-19T12:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Two date formats in the same column, unifying date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271693#M269504</link>
      <description>Kurt, you are amazing!</description>
      <pubDate>Thu, 19 May 2016 12:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-date-formats-in-the-same-column-unifying-date-formats/m-p/271693#M269504</guid>
      <dc:creator>metallon</dc:creator>
      <dc:date>2016-05-19T12:07:44Z</dc:date>
    </item>
  </channel>
</rss>

