Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to convert a given date value into SAS date

Answer Posted / arish kumar

e.g the date is '05/09/2007'

we can use the input function to convert this string into SAS date i.e.
date='05/09/2007'
sasdate=input(date,mmddyy10.);

Also, we can use mdy function.For this first use substr function.

m=substr(date,4,2);
d=substr(date,1,2);
y=substr(date,7,4);
sasdate=mdy(m,d,y);

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain proc univariate?

972


I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.

2107


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

1302


How to include or exclude specific variables in a data set?

1064


Name any two sas spawners? : sas-grid-administration

986


Mention few capabilities of sas framework.

1130


what is ae onset date n what is RDS

2466


What are pdv and it functions?

1042


Have you used macros? For what purpose you have used? : sas-macro

996


What is substr function?

1120


What is the difference between INPUT and INFILE ?

1242


what is the difference between infile and input? : Sas-administrator

1064


Give some examples where proc report’s defaults are different than proc print’s defaults?

1015


How is character variable converted into numeric variable and vice versa?

1110


what can you learn from the sas log when debugging? : Sas programming

1028