I have date in character format and i want to convert it into date format
this is year and then month
i want to convert in date format like
date(In Date format)
You can't directly. SAS only treats full and valid dates as date values. So what you need to do is to padd out what you have with day, then apply a format which only displays MM-YYYY - even though behind the scenes the date is complete:
data want; dt="2003-01"; actual=input(cats(dt,"-01"),yymmdd10.); format actual mmyy8.; run;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.