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