ACT/ACT function

Accepted Solution Solved
Reply
Contributor
Posts: 57
Accepted Solution

ACT/ACT function

I would like to change the following to statement to check for months rather than days:

datdif(index_date,treated_date,'act/act')

What would I need to change so that  datdiff can back in months between the diagnosis and Index date rather than days.

Many thanks.


Accepted Solutions
Solution
‎05-16-2014 05:59 AM
Super Contributor
Posts: 644

Re: ACT/ACT function

@RW9

Not sure why "you would need to check if yearpart different from yearpart other date first".  INTCK() handles full SAS dates.

@lisahoward

INTCK('MONTH', index_date,treated_date, 'SAME')

The SAME alignment counts each month from the same day as the day of the start month

Richard

View solution in original post


All Replies
Super User
Super User
Posts: 7,988

Re: ACT/ACT function

Posted in reply to lisahoward

Hi,

Have a look at the INTCK function as this does all the different intervals - QTR, YEAR, MONTHS etc.

Just to note, you would need to check if yearpart different from yearpart other date first.

Solution
‎05-16-2014 05:59 AM
Super Contributor
Posts: 644

Re: ACT/ACT function

@RW9

Not sure why "you would need to check if yearpart different from yearpart other date first".  INTCK() handles full SAS dates.

@lisahoward

INTCK('MONTH', index_date,treated_date, 'SAME')

The SAME alignment counts each month from the same day as the day of the start month

Richard

Contributor
Posts: 57

Re: ACT/ACT function

Posted in reply to lisahoward

Thank you All.

🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 401 views
  • 0 likes
  • 3 in conversation