<?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: SAS Dates in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186317#M47321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the original question has been deleted, here is a copy from Google's cache.&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I have a Data set that contains separate columns for day, month and year. I need to consolidated these into one single variable .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Example:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1985&amp;nbsp;&amp;nbsp; (consolidated into a single SAS date)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Would I want to use the MDY Function? and what would this look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Once I've consolidated this date I need to find the difference from this new column and another date column that was originally a single columned date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks!&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2014 00:30:32 GMT</pubDate>
    <dc:creator>dkb</dc:creator>
    <dc:date>2014-10-16T00:30:32Z</dc:date>
    <item>
      <title>SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186315#M47319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 23:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186315#M47319</guid>
      <dc:creator>JackFerral</dc:creator>
      <dc:date>2014-10-15T23:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186316#M47320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this will produce the desired output. I am assuming the difference between dates as number of days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input m d y date1 :mmddyy10.;&lt;/P&gt;&lt;P&gt;date2=mdy(m,d,y);&lt;/P&gt;&lt;P&gt;date_diff_day=intck('day',date2,date1);&lt;/P&gt;&lt;P&gt;format date1 date2 date9.;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1985&amp;nbsp; 01/30/1986&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=have;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 00:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186316#M47320</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-16T00:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Dates</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186317#M47321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the original question has been deleted, here is a copy from Google's cache.&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I have a Data set that contains separate columns for day, month and year. I need to consolidated these into one single variable .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Example:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1985&amp;nbsp;&amp;nbsp; (consolidated into a single SAS date)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Would I want to use the MDY Function? and what would this look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Once I've consolidated this date I need to find the difference from this new column and another date column that was originally a single columned date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks!&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Jack&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 00:30:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Dates/m-p/186317#M47321</guid>
      <dc:creator>dkb</dc:creator>
      <dc:date>2014-10-16T00:30:32Z</dc:date>
    </item>
  </channel>
</rss>

