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.))
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.
Ready to level-up your skills? Choose your own adventure.