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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.