<?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: EG or CODE- change dob format ( from text to date) , calculate age in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28522#M5258</link>
    <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
To convert a date string to a number representing a SAS date use a informat. Which informat to use depends on the form of the date string you have.&lt;BR /&gt;
&lt;BR /&gt;
You could try:&lt;BR /&gt;
SASDateVar=input(DateStringVar,anydtdte.);&lt;BR /&gt;
&lt;BR /&gt;
Age in days would then be:&lt;BR /&gt;
Age=today() - SASDateVar;&lt;BR /&gt;
&lt;BR /&gt;
If you have to calculate the age based on a year with 360 days then look up function DATDIF() in the Base SAS documentation.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
    <pubDate>Thu, 04 Nov 2010 17:03:17 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2010-11-04T17:03:17Z</dc:date>
    <item>
      <title>EG or CODE- change dob format ( from text to date) , calculate age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28521#M5257</link>
      <description>How can I change date format from text to date : &lt;BR /&gt;
then create the variable called age to calculate the account age.&lt;BR /&gt;
&lt;BR /&gt;
How to in Enterprise Guide  ? &lt;BR /&gt;
How to in code ?</description>
      <pubDate>Thu, 04 Nov 2010 16:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28521#M5257</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-04T16:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: EG or CODE- change dob format ( from text to date) , calculate age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28522#M5258</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
To convert a date string to a number representing a SAS date use a informat. Which informat to use depends on the form of the date string you have.&lt;BR /&gt;
&lt;BR /&gt;
You could try:&lt;BR /&gt;
SASDateVar=input(DateStringVar,anydtdte.);&lt;BR /&gt;
&lt;BR /&gt;
Age in days would then be:&lt;BR /&gt;
Age=today() - SASDateVar;&lt;BR /&gt;
&lt;BR /&gt;
If you have to calculate the age based on a year with 360 days then look up function DATDIF() in the Base SAS documentation.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Thu, 04 Nov 2010 17:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28522#M5258</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-11-04T17:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: EG or CODE- change dob format ( from text to date) , calculate age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28523#M5259</link>
      <description>Thank you !! that works perfect</description>
      <pubDate>Fri, 05 Nov 2010 14:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EG-or-CODE-change-dob-format-from-text-to-date-calculate-age/m-p/28523#M5259</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-05T14:55:52Z</dc:date>
    </item>
  </channel>
</rss>

