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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 847 views
  • 1 like
  • 2 in conversation