DATA Step, Macro, Functions and more

Calculating the Time between dates

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

Calculating the Time between dates

[ Edited ]

Hi,

 

I have two dates in my data set and I need to calculate each persons age at the time of the second date. How can I do this? I have provided the formate in wich the dates are stored in my dataset below.

 

ID         DOB                  Medication

1         01JAN1988          23DEC2006

2         10MAY1962         09FEB2010

 

 

-Thx


Accepted Solutions
Solution
‎03-16-2017 02:07 PM
Respected Advisor
Posts: 3,124

Re: Calculating the Time between dates

Check out YRDIF() function with 'AGE' argument.

View solution in original post


All Replies
Solution
‎03-16-2017 02:07 PM
Respected Advisor
Posts: 3,124

Re: Calculating the Time between dates

Check out YRDIF() function with 'AGE' argument.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 119 views
  • 0 likes
  • 2 in conversation