<?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 Data type conversion in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Data-type-conversion/m-p/634720#M21232</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;How can i convert a string containing alphabets and date values and extract only date values from that.&lt;/P&gt;&lt;P&gt;Please find the below example:&lt;/P&gt;&lt;P&gt;The variable Details have the observations as below (dates not at particular position).&lt;/P&gt;&lt;P&gt;I need to extract the date values only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details&lt;/P&gt;&lt;P&gt;SAS_Anaytics_is_very_usefull_since_01Jan1960.&lt;/P&gt;&lt;P&gt;By_20Aug1990_it_has_become_more_powerfull.&lt;/P&gt;&lt;P&gt;Today_it_has_gained_huge_response_from_users_across_world_by_25Mar2020.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 12:21:25 GMT</pubDate>
    <dc:creator>mahender1</dc:creator>
    <dc:date>2020-03-25T12:21:25Z</dc:date>
    <item>
      <title>Data type conversion</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-type-conversion/m-p/634720#M21232</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;How can i convert a string containing alphabets and date values and extract only date values from that.&lt;/P&gt;&lt;P&gt;Please find the below example:&lt;/P&gt;&lt;P&gt;The variable Details have the observations as below (dates not at particular position).&lt;/P&gt;&lt;P&gt;I need to extract the date values only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details&lt;/P&gt;&lt;P&gt;SAS_Anaytics_is_very_usefull_since_01Jan1960.&lt;/P&gt;&lt;P&gt;By_20Aug1990_it_has_become_more_powerfull.&lt;/P&gt;&lt;P&gt;Today_it_has_gained_huge_response_from_users_across_world_by_25Mar2020.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 12:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-type-conversion/m-p/634720#M21232</guid>
      <dc:creator>mahender1</dc:creator>
      <dc:date>2020-03-25T12:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data type conversion</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-type-conversion/m-p/634728#M21234</link>
      <description>&lt;P&gt;I think you would have to break up the string into "words", and when one of the "words" is a valid date, you save it as a date (not a text string).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
string='By_20Aug1990_it_has_become_more_powerfull.';
do i=1 to countw(string,'_');
    thisstring=scan(string,i,'_');
	date = input(thisstring,date9.);
	if not missing(date) then output;
	format date date9.;
	drop i thisstring;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 12:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-type-conversion/m-p/634728#M21234</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-25T12:42:03Z</dc:date>
    </item>
  </channel>
</rss>

