I was extracting Year, Month Name and Day Name from Date column. But the problem that I faced during the extraction of day name. In result till 31-01-2022 day name is showing correctly and when 01-02-2022 starts wrong day name is getting printed it continues till 31-01-2023 which is the last date in my dataset. For Example on 01-02-2022 day should be Tuesday but result I am getting is Saturday. Contents of table Snapshot of result of I am getting My Code: DATA formated_date;
SET date;
Year = YEAR(Date);
Month_Name = PUT(Date, MONNAME.);
Day_Name = DAY(Date);
FORMAT Day_Name downame9.;
RUN; Can anyone please tell me why I am getting wrong results?
... View more