BookmarkSubscribeRSS Feed
cnn96
Fluorite | Level 6

Hello people

 

For my work I have to create age groups. For this I have birth dates and claim dates. I need to determine the grouping based on the distance between claim date and birth date.

For example, if the distance between claim date and birthdate is 28 days then the patient ID comes in the group 3, otherwise it comes in the group 2.2023-02-02 144928.png

 

Can anyone help me how to code this?

Thank you in advance.

 

Cnn

 

 

1 REPLY 1
PaigeMiller
Diamond | Level 26

If your variables contain actual numeric SAS date values, the difference between the two dates is found by subtracting.

--
Paige Miller

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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