<?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: Converting dates from text format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54953#M15258</link>
    <description>The most effective approach within the SAS system is to assign DATE and / or DATETIME SAS (numeric) variables. So, then using these numeric variables, you can display them in various formats, while still being able to compare and calculate differences and such with the numeric SAS variable (which are stored internally as days since 1/1/1960 or seconds since 1/1/1960).&lt;BR /&gt;
&lt;BR /&gt;
I have provided a SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  link to related DOC for your reference (mind any broken URL string):&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 DOC - About SAS Date, Time, and Datetime Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a002200738.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
more of the same topic discussion at the link below:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_intervals_sect014.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_intervals_sect014.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 16 Oct 2008 19:52:11 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2008-10-16T19:52:11Z</dc:date>
    <item>
      <title>Converting dates from text format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54952#M15257</link>
      <description>In my dataset, dates are stored in text as daymonthyear, where "day" is the date in two digits, "month" is 3-letter abbreviation for the month, and "year" is the 4-digit year.  I want to retain month and year in a date or numeric format to ease comparison of data across months.  What is the most efficient way to do this?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 16 Oct 2008 19:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54952#M15257</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-10-16T19:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Converting dates from text format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54953#M15258</link>
      <description>The most effective approach within the SAS system is to assign DATE and / or DATETIME SAS (numeric) variables. So, then using these numeric variables, you can display them in various formats, while still being able to compare and calculate differences and such with the numeric SAS variable (which are stored internally as days since 1/1/1960 or seconds since 1/1/1960).&lt;BR /&gt;
&lt;BR /&gt;
I have provided a SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  link to related DOC for your reference (mind any broken URL string):&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 DOC - About SAS Date, Time, and Datetime Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a002200738.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
more of the same topic discussion at the link below:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_intervals_sect014.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_intervals_sect014.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 16 Oct 2008 19:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54953#M15258</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-10-16T19:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Converting dates from text format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54954#M15259</link>
      <description>data test;&lt;BR /&gt;
dates_txt = '20oct2008';&lt;BR /&gt;
dates_sd  = input(dates_txt,date9.); put dates_sd= date.;&lt;BR /&gt;
month = month(dates_sd);&lt;BR /&gt;
year =  year(dates_sd);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Store your dates as numeric variables (ie. the result of dates_sd), then you can use all the many SAS date functions and formats.</description>
      <pubDate>Mon, 20 Oct 2008 12:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Converting-dates-from-text-format/m-p/54954#M15259</guid>
      <dc:creator>GertNissen</dc:creator>
      <dc:date>2008-10-20T12:21:14Z</dc:date>
    </item>
  </channel>
</rss>

