<?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: Another date calculation SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329055#M73561</link>
    <description>&lt;P&gt;Then you can use the intck function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;age_in_years = intck('dtyear',date_of_birth,datetime());&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Feb 2017 12:10:18 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-02-01T12:10:18Z</dc:date>
    <item>
      <title>Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329044#M73556</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this format of a birth date : 06FEB81:00:00:00 and from this I have to calculate the age of the person. How I have to format this in order to be able to use it and then what? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 11:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329044#M73556</guid>
      <dc:creator>Argonious</dc:creator>
      <dc:date>2017-02-01T11:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329049#M73558</link>
      <description>&lt;P&gt;Is this value stored as character or as a SAS datetime value (numeric, with a datetime format)?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 11:59:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329049#M73558</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-01T11:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329054#M73560</link>
      <description>&lt;P&gt;Datetime. the informat is ANYDTDTM40.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329054#M73560</guid>
      <dc:creator>Argonious</dc:creator>
      <dc:date>2017-02-01T12:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329055#M73561</link>
      <description>&lt;P&gt;Then you can use the intck function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;age_in_years = intck('dtyear',date_of_birth,datetime());&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329055#M73561</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-01T12:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329057#M73562</link>
      <description>&lt;P&gt;I have my answer! Thank you very much! I tried to use this function earlier, but was doing it wrong. Now it works fine. Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329057#M73562</guid>
      <dc:creator>Argonious</dc:creator>
      <dc:date>2017-02-01T12:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329129#M73584</link>
      <description>&lt;P&gt;Note that what you see is a pet peeve of mine, which seems to come from some defaults and/or lazy programming in some applications: storing DATE values as DATETIME. If your data, or your use, has not actual need of the time component you can reduce the variable to only date values using: Date = datepart(datetimevariable); (you could use the same variable as the result) and assign appropriate format for display.&lt;/P&gt;
&lt;P&gt;Otherwise in the INTCK and INTNX functions when using a period like 'year' or 'month' you preface the period with 'dt' to tell SAS the value is a date time, hence the 'dtyear'&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 15:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329129#M73584</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-01T15:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329132#M73585</link>
      <description>&lt;P&gt;Pet Peeve yes.&amp;nbsp; But ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Elvis has left the building&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 16:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329132#M73585</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-02-01T16:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Another date calculation SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329161#M73598</link>
      <description>&lt;P&gt;On top of what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;said, date values can be stored in 4-byte numeric variables, while datetimes need all 8 bytes of the default numeric length.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 17:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Another-date-calculation-SAS/m-p/329161#M73598</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-01T17:05:17Z</dc:date>
    </item>
  </channel>
</rss>

