First of all, do not (as in NOT) use two-digit years, or formats that display only 2 year digits for dates. It only causes confusion, for no gain.
If you got the raw Excel value in a date, add
'30dec1899'd
to it, and you'll get the correct date in SAS.
This value covers three things:
I'm sending you a link to a post talking about conversion from Excel dates to SAS dates.
Maybe you can use SAS_date = Excel_date - 21916; to convert your Excel date to a SAS date.
Just one thing, you'll have to convert your character variable "date" to a numeric variable using INPUT (eg: numeric_date = input(date, 8.))
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: