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

Could anyone help me to change to the DATE format from the character? I have added the first two observations for the character variable:

10/9/2020, 12:11 AM

10/28/2020, 1:04 PM

 

Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
dateVar = input(scan(charVar, 1, ","), mmddyy10.);
format dateVar date9.;

View solution in original post

2 REPLIES 2
Reeza
Super User
dateVar = input(scan(charVar, 1, ","), mmddyy10.);
format dateVar date9.;
Friend1
Calcite | Level 5
Thank you, Reeza for your help.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 386 views
  • 1 like
  • 2 in conversation