BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sathish_jammy
Lapis Lazuli | Level 10

Hi community,

 

In  the given table few of dates are not convert to the actual column pls help me to resolve it.

data dos;
set proj.saswrk;
diab_date = input(strip(diab_dateonset),mmddyy10.);
format diab_date mmddyy10.;
run;

Diab_dateonset - varchar datatype

 

Diab_dateonsetdiab_date
14/03/2009.
21/11/1992.
 .
 .
 .
09/10/200609/10/2006
 .
 .
07/08/201007/08/2010
14/08/2009.
15/03/2012.
 .
25/04/2013.
09/12/200909/12/2009
 .
08/08/201508/08/2015

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You want ddmmyy format and informat.

 

You can't use format or informat mmddyy because some of your date values begin with 14 or 25 and there's no month 14 or 25.

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

You want ddmmyy format and informat.

 

You can't use format or informat mmddyy because some of your date values begin with 14 or 25 and there's no month 14 or 25.

--
Paige Miller
Sathish_jammy
Lapis Lazuli | Level 10

 

Ohw !...

Thank you buddy!

Reeza
Super User

@Sathish_jammy Please mark @PaigeMiller answer as the solution, so others know this is solved. 

Sathish_jammy
Lapis Lazuli | Level 10

Sorry!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 873 views
  • 0 likes
  • 3 in conversation