<?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: Age in months to the nearest day in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828763#M327393</link>
    <description>&lt;P&gt;If you look in the CDCref_d.csv, or the data set, you will AGEMOS1 variable ends in .5 except for the first one with 0.&lt;/P&gt;
&lt;P&gt;So just add .5 to your Intck result for comparison when using AGEMOS1.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 21:55:18 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-08-15T21:55:18Z</dc:date>
    <item>
      <title>Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828747#M327385</link>
      <description>&lt;P&gt;Does anybody know how I can obtain age in months, to the nearest day? I'm trying to use a CDC SAS program meant to calculate BMI z-scores and percentile and in the instructions it says that in order to use the program, my data needs to contain the child's age in months (&lt;SPAN&gt;number of months to the nearest day based on the dates of birth and examination).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example, if a child was born on Oct 1, 2007 and was examined on Nov 15, 2011, the child’s age would be 1506 days or 49.48 months.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I've been using the following syntax but it's giving me an exact number of months, i.e. 49 months, not 49.48?&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;intck('month', birthdt, examdt)-(day(examdt)&amp;lt;day(birthdt));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2022 19:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828747#M327385</guid>
      <dc:creator>Merdock</dc:creator>
      <dc:date>2022-08-15T19:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828748#M327386</link>
      <description>&lt;P&gt;It may help to provide a link to exactly which CDC BMI related files you are using. &lt;BR /&gt;I have dealt with some of those that want effectively a "mid-month" value, not a rounding to a "closest day".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will also need to explain exactly how you get the 0.48 part of 49.48.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 20:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828748#M327386</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-15T20:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828753#M327388</link>
      <description>&lt;P&gt;The idea of fractional months only makes sense if you are willing to assume the same number of days per month (which I am not willing to assume in my work). Otherwise, it is, in my opinion, gibberish and the numbers to the right of the decimal are meaningless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could come up with an answer of 49 months and 14 days, that makes perfect sense to me.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 20:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828753#M327388</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-15T20:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828754#M327389</link>
      <description>&lt;P&gt;Oh, yes, sorry about that. I am looking here:&amp;nbsp;&lt;A href="https://www.cdc.gov/nccdphp/dnpao/growthcharts/resources/sas.htm" target="_blank"&gt;https://www.cdc.gov/nccdphp/dnpao/growthcharts/resources/sas.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Specifically the part where it says "Instructions for SAS users" for how to use the&amp;nbsp;&lt;A href="https://www.cdc.gov/nccdphp/dnpao/growthcharts/resources/cdc-source-code.sas" target="new"&gt;cdc-source-code.sas&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;program. I have a dataset with heights, weights, gender, date of birth and examination dates for my patients, and was trying to obtain gender-specific BMI-for-height-age percentiles and Z-scores.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 20:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828754#M327389</guid>
      <dc:creator>Merdock</dc:creator>
      <dc:date>2022-08-15T20:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828763#M327393</link>
      <description>&lt;P&gt;If you look in the CDCref_d.csv, or the data set, you will AGEMOS1 variable ends in .5 except for the first one with 0.&lt;/P&gt;
&lt;P&gt;So just add .5 to your Intck result for comparison when using AGEMOS1.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 21:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828763#M327393</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-15T21:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828834#M327435</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
month=yrdif('01Oct2007'd,'15Nov2011'd,'age')*12;
put month=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2022 12:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828834#M327435</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-08-16T12:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828839#M327440</link>
      <description>&lt;P&gt;The categories in that code only need age in months measured to the half a month.&lt;/P&gt;
&lt;P&gt;You can decide what that means.&lt;/P&gt;
&lt;P&gt;Here is code that says if it is 15 or more extra days then it is an extra half a month.&lt;/P&gt;
&lt;P&gt;Use the Continuous option of INTCK() to calculate the months.&amp;nbsp; Then you can use the same option of INTNX() to count how many extra days.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input (birthdt examdt) (:date9.);
  months = intck('month', birthdt, examdt,'c');
  day = examdt - intnx('month',birthdt,months,'same');
  agemos = months +0.5*(day&amp;gt;=15);
  format birthdt examdt date9.;
cards;
05OCT2007 07NOV2011
05OCT2007 20NOV2011
05OCT2007 28NOV2011
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828839#M327440</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-08-16T13:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828943#M327472</link>
      <description>Thank you, Tom, that works!</description>
      <pubDate>Tue, 16 Aug 2022 23:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828943#M327472</guid>
      <dc:creator>Merdock</dc:creator>
      <dc:date>2022-08-16T23:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Age in months to the nearest day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828944#M327473</link>
      <description>thank you!</description>
      <pubDate>Tue, 16 Aug 2022 23:31:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Age-in-months-to-the-nearest-day/m-p/828944#M327473</guid>
      <dc:creator>Merdock</dc:creator>
      <dc:date>2022-08-16T23:31:19Z</dc:date>
    </item>
  </channel>
</rss>

