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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 2 replies
  • 775 views
  • 1 like
  • 2 in conversation