<?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: Convert $10. to mmddyy10. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42310#M10993</link>
    <description>Use this technique and INFORMAT:&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
dt = input("2008/10/10",anydtdte10.);&lt;BR /&gt;
put dt= mmddyy10.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 28 Aug 2008 18:10:40 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2008-08-28T18:10:40Z</dc:date>
    <item>
      <title>Convert $10. with value of yyyy-mm-dd to display as mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42303#M10986</link>
      <description>I need to convert a result column from a database search from character $10. format to display in a report as mm/dd/yyyy format.

Message was edited by: jcakers</description>
      <pubDate>Wed, 27 Aug 2008 20:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42303#M10986</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-27T20:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42304#M10987</link>
      <description>how do you get this information out of your database?&lt;BR /&gt;
It may be possible for that platform to make the conversion in a way that a SAS/Access connection will recognise the information as a date.&lt;BR /&gt;
&lt;BR /&gt;
hth&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Wed, 27 Aug 2008 21:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42304#M10987</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2008-08-27T21:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42305#M10988</link>
      <description>Use an informat to convert the character string to a SAS date and use a format to write the SAS date in the form you want to.&lt;BR /&gt;
Example:&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  datestring='20080828';&lt;BR /&gt;
  date=input(datestring,yymmdd10.);&lt;BR /&gt;
  put date= ddmmyy10.;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 27 Aug 2008 23:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42305#M10988</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-08-27T23:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42306#M10989</link>
      <description>I tried that, and here's the log result:&lt;BR /&gt;
&lt;BR /&gt;
MPRINT(QLA025):   start_date=input(PERIOD_START_DT,yymmdd10.);&lt;BR /&gt;
MPRINT(QLA025):   put start_date= ddmmyy10.;&lt;BR /&gt;
MPRINT(QLA025):   end_date=input(PERIOD_END_DT,yymmdd10.);&lt;BR /&gt;
MPRINT(QLA025):   put end_date= ddmmyy10.;&lt;BR /&gt;
MPRINT(QLA025):   set displayDataSet;&lt;BR /&gt;
ERROR: Variable PERIOD_START_DT has been defined as both character and numeric.&lt;BR /&gt;
ERROR: Variable PERIOD_END_DT has been defined as both character and numeric.&lt;BR /&gt;
&lt;BR /&gt;
along with:&lt;BR /&gt;
WARNING: The data set WORK.DISPLAYDATASET may be incomplete.  When this step was stopped there&lt;BR /&gt;
         were 0 observations and 27 variables.&lt;BR /&gt;
WARNING: Data set WORK.DISPLAYDATASET was not replaced because this step was stopped.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The variables PERIOD_START_DT and PERIOD_END_DT are defined in the SQL result table as $10. with values either spaces or like 2008-12-31 (yes, with the dashes in the field).&lt;BR /&gt;
&lt;BR /&gt;
So how do I get it to re-format and display the field as mm/dd/yyyy?</description>
      <pubDate>Thu, 28 Aug 2008 14:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42306#M10989</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-28T14:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42307#M10990</link>
      <description>The data is retrieved with a PROC SQL in a separate macro, and results are placed into a work table.&lt;BR /&gt;
&lt;BR /&gt;
Eg:&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
connect to db2 as db2(dsn=&amp;amp;dsource uid=&amp;amp;uID pwd=&amp;amp;pwd );&lt;BR /&gt;
create table PENDING_APPS as&lt;BR /&gt;
select * from connection to db2&lt;BR /&gt;
(&lt;BR /&gt;
SELECT.....FROM.....WHERE.....&lt;BR /&gt;
)</description>
      <pubDate>Thu, 28 Aug 2008 14:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42307#M10990</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-28T14:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42308#M10991</link>
      <description>I've just tried the sledgehammer method, and got the same error:&lt;BR /&gt;
&lt;BR /&gt;
MPRINT(QLA025):&lt;BR /&gt;
start_date=substr(PROCESSING_START_DT,6,2)||'/'||substr(PROCESSING_START_DT,9,2)||'/'||substr(PROCESSING_START_DT,1,4);&lt;BR /&gt;
MPRINT(QLA025):&lt;BR /&gt;
end_date=substr(PROCESSING_END_DT,6,2)||'/'||substr(PROCESSING_END_DT,9,2)||'/'||substr(PROCESSING_&lt;BR /&gt;
END_DT,1,4);&lt;BR /&gt;
MPRINT(QLA025):   set displayDataSet;&lt;BR /&gt;
ERROR: Variable PROCESSING_START_DT has been defined as both character and numeric.&lt;BR /&gt;
ERROR: Variable PROCESSING_END_DT has been defined as both character and numeric.&lt;BR /&gt;
&lt;BR /&gt;
I'm not applying any formatting to the fields, anywhere. How does something get defined as both character and numeric?!</description>
      <pubDate>Thu, 28 Aug 2008 15:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42308#M10991</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-28T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42309#M10992</link>
      <description>Ok, the sledgehammer way works - when you use the same field names of start_date and end_date in the DATA step as the PROC REPORT step.  My error was the PROC REPORT step used start_dt and end_dt.&lt;BR /&gt;
&lt;BR /&gt;
So I don't know why the error showed on the other fields.&lt;BR /&gt;
&lt;BR /&gt;
But if anyone has a better way than to SUBSTR, I'd love to hear it.

Message was edited by: jcakers</description>
      <pubDate>Thu, 28 Aug 2008 16:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42309#M10992</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-28T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42310#M10993</link>
      <description>Use this technique and INFORMAT:&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
dt = input("2008/10/10",anydtdte10.);&lt;BR /&gt;
put dt= mmddyy10.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 28 Aug 2008 18:10:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42310#M10993</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-08-28T18:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert $10. to mmddyy10.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42311#M10994</link>
      <description>This is just what I was looking for - I didn't know about anydtdte10. format.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 28 Aug 2008 18:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Convert-10-with-value-of-yyyy-mm-dd-to-display-as-mmddyy10/m-p/42311#M10994</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-28T18:44:27Z</dc:date>
    </item>
  </channel>
</rss>

