Hi ,
I am looking for code to extract only the data with last day of the month.
eg. if a dataset contains incremental data of every day and from that data i need to filter only the data for last day of every month.
linke if my data is having 6 months of data like from Jan to June the i want to have data as per only last day of every month, i.e 31stjan, 28th feb,31march,30april,31may,30june,31july etc.
so , I am telling you what my understanding is based on your requirement that you want to have data only for those dates ?
if you can explain by putting example would be more clear.
Thanks
Assuming that your dates are SAS dates, you can select dates that are the last day of the month with the condition
if date = intnx("MONTH", date, 0, "END");
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.