turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Intck vs. Yrdif

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-05-2010 12:13 PM

Can you tell me why the Intck function and the Yrdif function will produce two different values when the input dates are the same? I am trying to calculate time at age of entry for patients, and if I use the Intck funciton I am getting some differences than when I use the Yrdif function. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to StephG

10-05-2010 12:23 PM

age is an interestingly challenging assumption

(who knows how many ways there are to calculate age? ;-)

-- what would you like ?

- remember years have differing numbers of days

- decide when those born on a 29th Feb should celebrate their 18th and 21st birthdays

age nearest?

age next birthday?

number of days old is probably the only reliable calculation

so again, how would you like to calculate age - what are your rules?

peterC

P.S.

yrdif() is deprecated for age calculations, see SAS USAGE NOTE:

36977 - Using the YRDIF function to calculate age can give incorrect results

at http://support.sas.com/kb/36/977.html

(who knows how many ways there are to calculate age? ;-)

-- what would you like ?

- remember years have differing numbers of days

- decide when those born on a 29th Feb should celebrate their 18th and 21st birthdays

age nearest?

age next birthday?

number of days old is probably the only reliable calculation

so again, how would you like to calculate age - what are your rules?

peterC

P.S.

yrdif() is deprecated for age calculations, see SAS USAGE NOTE:

36977 - Using the YRDIF function to calculate age can give incorrect results

at http://support.sas.com/kb/36/977.html