Can anyone please tell me how can i subset the data after a given date . I think i have to use date fn . But dnt know how to keep date in a conditional statement how to find variable informat . ?
Your pidgin english makes no sense. Please post your question in clear, understandable language.
how can i seperate out the data launged after 20 jan 1990 from vechiles
date gt '20JAN1990'
sir i want to get all the date after 20 jan . Then what i should do ?
You should read this chapter.
You can filter dates with a standard IF/WHERE statement, but you need to use dates with the proper format.
'01JAN2017'd -> note the quotes, 3 letter month, and d after the quotes
data want;
set sashelp.stocks;
where date > '01Jan2000'd;
run;
Please post some example data, and which rows you want selected/not selected.
Basically, you can use a where condition or a subsetting if.
i have attached the sample data set . Can you please know tell me how can i seperate out data for passangers vehicles launced after 20 jan .
libname _class_s "/folders/myfolders/ 1";
PROC IMPORT DATAFILE="/folders/myfolders/1/Car_sales.csv"
OUT=_class_s.Car_sales
DBMS=csv
REPLACE;
RUN;
I have used the above code to import the file and it has import succesfully as i am able to see all the data present in my car file.
proc imports recognizes Latest_Launch as SAS-date, so use the example code posted by @Reeza.
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 25. 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.