<?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: date-remove slash in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66972#M19151</link>
    <description>Try using compress(var,'/')&lt;BR /&gt;
&lt;BR /&gt;
Good luck!</description>
    <pubDate>Wed, 18 May 2011 14:50:42 GMT</pubDate>
    <dc:creator>RickM</dc:creator>
    <dc:date>2011-05-18T14:50:42Z</dc:date>
    <item>
      <title>date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66968#M19147</link>
      <description>I need to change the dates in a column from 99/9999 to 999999.  How do I remove the slash?</description>
      <pubDate>Wed, 18 May 2011 13:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66968#M19147</guid>
      <dc:creator>tjonas</dc:creator>
      <dc:date>2011-05-18T13:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66969#M19148</link>
      <description>If they are formatted dates, just change the format.  If they are character strings, there are several character functions that will do it; SUBSTR and || is sort of brute force, but will work.</description>
      <pubDate>Wed, 18 May 2011 14:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66969#M19148</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-05-18T14:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66970#M19149</link>
      <description>&amp;gt; If they are formatted dates, just change the format.&lt;BR /&gt;
&amp;gt; If they are character strings, there are several&lt;BR /&gt;
&amp;gt; character functions that will do it; SUBSTR and ||&lt;BR /&gt;
&amp;gt;  is sort of brute force, but will work.&lt;BR /&gt;
&lt;BR /&gt;
Brute Force - Love it. &lt;BR /&gt;
&lt;BR /&gt;
I have to put in a good word for this book that is well-worn along with my SAS course books I've collected... It's available in the SAS bookstore and other places.&lt;BR /&gt;
&lt;BR /&gt;
The Essential Guide to SAS Dates and Times &lt;BR /&gt;
By: Derek Morgan &lt;BR /&gt;
176 pages &lt;BR /&gt;
ISBN: 978-1-59047-884-4  &lt;BR /&gt;
Publisher: SAS Press  &lt;BR /&gt;
Copyright Date: June 2006  &lt;BR /&gt;
Description: &lt;BR /&gt;
Why does SAS use January 1, 1960, as its arbitrary reference date? How do you convert a value such as 27 January 2003 into SAS dates? You'll find the answers to these questions and much more in Derek Morgan's Essential Guide to SAS Dates and Times, which makes it easy to understand how to use and manipulate dates, times, and datetimes in SAS. Novice-to-intermediate users will find the clear, task-focused examples and explanations of formats and functions invaluable; experienced users will appreciate discussions of topics such as intervals and international date and time formats. Included is a bonus "Quick Reference Guide" listing all the formats (with examples) on one handy page.</description>
      <pubDate>Wed, 18 May 2011 14:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66970#M19149</guid>
      <dc:creator>stateworker</dc:creator>
      <dc:date>2011-05-18T14:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66971#M19150</link>
      <description>They are in text format.</description>
      <pubDate>Wed, 18 May 2011 14:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66971#M19150</guid>
      <dc:creator>tjonas</dc:creator>
      <dc:date>2011-05-18T14:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66972#M19151</link>
      <description>Try using compress(var,'/')&lt;BR /&gt;
&lt;BR /&gt;
Good luck!</description>
      <pubDate>Wed, 18 May 2011 14:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66972#M19151</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-05-18T14:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66973#M19152</link>
      <description>If you decide to brute force it, &lt;BR /&gt;
&lt;BR /&gt;
format M $2. Y $4.;&lt;BR /&gt;
M=substr(var, 1,2);  *** this will give you the 99 before the slash ***;&lt;BR /&gt;
Y=substr(var, 4,4);  *** this will give you the 9999 after the slash ***;&lt;BR /&gt;
newdate=(M||Y);  *** this will concantenate the two variables to give you 999999 ***;</description>
      <pubDate>Wed, 18 May 2011 14:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66973#M19152</guid>
      <dc:creator>stateworker</dc:creator>
      <dc:date>2011-05-18T14:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66974#M19153</link>
      <description>I'm a new sas user and I've never heard of brute force.  &lt;BR /&gt;
&lt;BR /&gt;
Is this close?&lt;BR /&gt;
&lt;BR /&gt;
data slash (keep=temp);&lt;BR /&gt;
set ytd;&lt;BR /&gt;
format date MMYYN.;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 18 May 2011 15:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66974#M19153</guid>
      <dc:creator>tjonas</dc:creator>
      <dc:date>2011-05-18T15:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: date-remove slash</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66975#M19154</link>
      <description>If your date is a character variable then use the compress funtion.  If it is a numeric SAS date then use the format.&lt;BR /&gt;
&lt;BR /&gt;
data _NULL_;&lt;BR /&gt;
a='05/2011';&lt;BR /&gt;
b= compress(a,'/');&lt;BR /&gt;
c=today();&lt;BR /&gt;
d=c;&lt;BR /&gt;
format d mmyyn6.;&lt;BR /&gt;
put a= b= c= d=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
results in :&lt;BR /&gt;
a=05/2011 b=052011 c=18765 d=052011</description>
      <pubDate>Wed, 18 May 2011 15:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/date-remove-slash/m-p/66975#M19154</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-05-18T15:18:35Z</dc:date>
    </item>
  </channel>
</rss>

