BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASAna
Quartz | Level 8

Hi SAS users,

 

SAS dataset1 has   a field  clm_date   with  num 8 mmddyy10. format  ( data  Ex : 11/20/2019 )

SAS dataset1 has   a field  claim_FDOS with char10  $10 format. (data EX : 11/20/2019 )

 

I need help to merge these 2 datasets   by clm_date = claim_FDOS. How to convert the data type and merge them.

 

Thanks,

Ana 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Convert the character using an input:

 

data want;
    set have;
    newvar=input(claim_fdos,mmddyy10.);
    format newvar mmddyy10.;
run;

You need to provide a few more details on what you mean by "merge".
Best is to provide small examples of both sets AND what the desired result would be.

Typically merging by dates means that there are also other identification items involved because the same date can be associated with many people/activities/claims or what not.

View solution in original post

2 REPLIES 2
ballardw
Super User

Convert the character using an input:

 

data want;
    set have;
    newvar=input(claim_fdos,mmddyy10.);
    format newvar mmddyy10.;
run;

You need to provide a few more details on what you mean by "merge".
Best is to provide small examples of both sets AND what the desired result would be.

Typically merging by dates means that there are also other identification items involved because the same date can be associated with many people/activities/claims or what not.

SASAna
Quartz | Level 8
Thank you. worked very well.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 382 views
  • 0 likes
  • 2 in conversation