<?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 Date conversion and trim function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16186#M2913</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have the dataset with the fields, the eff and exp fields are the date type.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;ID   &lt;B&gt;comp&lt;/B&gt;   &lt;B&gt;grp&lt;/B&gt;  &lt;B&gt; eff                 &lt;/B&gt; exp&lt;/B&gt;&lt;BR /&gt;
1     04         y    09/10/2010 08/12/2013&lt;BR /&gt;
2     07         h    09/03/2009 07/02/2017&lt;BR /&gt;
&lt;BR /&gt;
I need the report to looks like,&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;ID&lt;/B&gt;   &lt;B&gt;comp&lt;/B&gt;  &lt;B&gt; grp  &lt;/B&gt; &lt;B&gt;eff&lt;/B&gt;                  &lt;B&gt;exp&lt;/B&gt;&lt;BR /&gt;
1     04         y    20101009     20131208&lt;B&gt;}&lt;/B&gt;&lt;BR /&gt;
2     07         h    20090309     20170207&lt;B&gt;}&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
    <pubDate>Fri, 17 Jun 2011 14:14:54 GMT</pubDate>
    <dc:creator>raveena</dc:creator>
    <dc:date>2011-06-17T14:14:54Z</dc:date>
    <item>
      <title>Date conversion and trim function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16186#M2913</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have the dataset with the fields, the eff and exp fields are the date type.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;ID   &lt;B&gt;comp&lt;/B&gt;   &lt;B&gt;grp&lt;/B&gt;  &lt;B&gt; eff                 &lt;/B&gt; exp&lt;/B&gt;&lt;BR /&gt;
1     04         y    09/10/2010 08/12/2013&lt;BR /&gt;
2     07         h    09/03/2009 07/02/2017&lt;BR /&gt;
&lt;BR /&gt;
I need the report to looks like,&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;ID&lt;/B&gt;   &lt;B&gt;comp&lt;/B&gt;  &lt;B&gt; grp  &lt;/B&gt; &lt;B&gt;eff&lt;/B&gt;                  &lt;B&gt;exp&lt;/B&gt;&lt;BR /&gt;
1     04         y    20101009     20131208&lt;B&gt;}&lt;/B&gt;&lt;BR /&gt;
2     07         h    20090309     20170207&lt;B&gt;}&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Fri, 17 Jun 2011 14:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16186#M2913</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-06-17T14:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion and trim function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16187#M2914</link>
      <description>I think all you need to do is change the format of the date columns to yymmddn8.  Do you need to add the "}" at the end of the second date?</description>
      <pubDate>Fri, 17 Jun 2011 14:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16187#M2914</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-06-17T14:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion and trim function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16188#M2915</link>
      <description>Hi DBailey,&lt;BR /&gt;
&lt;BR /&gt;
Yes I  need to } at the end of the field.</description>
      <pubDate>Fri, 17 Jun 2011 15:22:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16188#M2915</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2011-06-17T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion and trim function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16189#M2916</link>
      <description>Use a DATA step approach and the PUT statement to generate the data-lines.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
data step put statement external file site:sas.com</description>
      <pubDate>Fri, 17 Jun 2011 15:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16189#M2916</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-17T15:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion and trim function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16190#M2917</link>
      <description>Hey,&lt;BR /&gt;
You can use the proc format picture statment.&lt;BR /&gt;
For Example:&lt;BR /&gt;
&lt;BR /&gt;
data temp;&lt;BR /&gt;
eff='09oct2010'd;&lt;BR /&gt;
output;&lt;BR /&gt;
eff='09mar2009'd;&lt;BR /&gt;
output;&lt;BR /&gt;
format eff ddmmyy10.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc format;&lt;BR /&gt;
picture date_t (default=11)&lt;BR /&gt;
'01jan1950'd-'31dec2011'd='%0d%0m%Y}'&lt;BR /&gt;
(datatype=date);&lt;BR /&gt;
run;&lt;BR /&gt;
data temp2;&lt;BR /&gt;
set temp;&lt;BR /&gt;
format eff date_t.;&lt;BR /&gt;
run;</description>
      <pubDate>Sun, 19 Jun 2011 07:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Date-conversion-and-trim-function/m-p/16190#M2917</guid>
      <dc:creator>yonib</dc:creator>
      <dc:date>2011-06-19T07:12:07Z</dc:date>
    </item>
  </channel>
</rss>

