<?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 Sas dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177749#M264836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a study that has a starting point of 1998. I also have the variable "event date" which consists of a number either +/- the starting point. I would like to convert this number into "year of event" to determine in what year after 1998 the event occurred.&amp;nbsp; Is there a way to easily code this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Jul 2014 20:51:49 GMT</pubDate>
    <dc:creator>Mdormond</dc:creator>
    <dc:date>2014-07-13T20:51:49Z</dc:date>
    <item>
      <title>Sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177749#M264836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a study that has a starting point of 1998. I also have the variable "event date" which consists of a number either +/- the starting point. I would like to convert this number into "year of event" to determine in what year after 1998 the event occurred.&amp;nbsp; Is there a way to easily code this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 20:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177749#M264836</guid>
      <dc:creator>Mdormond</dc:creator>
      <dc:date>2014-07-13T20:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177750#M264837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use SAS date functions, shift the starting point date by &lt;EM&gt;event date&lt;/EM&gt; days and get what year that is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;starting_point = '25OCT1998'd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;year = year(intnx("DAY", starting_point, event_date));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jul 2014 21:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177750#M264837</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-07-13T21:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177751#M264838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;set have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;event=event_date+starting_point;&lt;/P&gt;&lt;P&gt;year = year(event);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;hope this code will solve your issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sudeer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 07:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177751#M264838</guid>
      <dc:creator>Chrishi</dc:creator>
      <dc:date>2014-07-14T07:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177752#M264839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whist the above two answers are completely correct, I am questioning what the question is.&amp;nbsp; You state you have a starting point of 1998, which is fine.&amp;nbsp; It is this event date variable which I am not sure on.&amp;nbsp; Does this reference a time interval from the year or something else.&amp;nbsp; I.e. does it contain days since 1998, years since then, quarters, or is it something completely adhoc such as category 2 indicates 5 years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 08:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sas-dates/m-p/177752#M264839</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-14T08:47:19Z</dc:date>
    </item>
  </channel>
</rss>

