In which format does Date stores in sas..?
What is the use of DATE in SAS.?
Answers were Sorted based on User's Feedback
Answer / satyanand
SAS represents a date internally as the number of days
between January 1, 1960 and the specified date. Dates
before 1960 are represented with negative numbers. A
SAS date value is a numeric variable
Is This Answer Correct ? | 22 Yes | 1 No |
In SAS the date has been stored as machine level language,
and the reference date for SAS is Jan 1, 1960.
To find out the exp of employees we have to use DOJ, then we
will use date.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mannna
it is stored as numeric values.
Eg
data aaa;
a=today();
put a;
run;
it will show you numeric no equivalent to current date.After using format staement u can get todays date as;
data aaa;
a=today();
format a date9.;
put a;
run;
Is This Answer Correct ? | 0 Yes | 0 No |
What is criteria for adverse events and treatment-emergent adverse events?
what is _error_?
2 Answers Axis Bank, Cognizant, JPMorgan Chase,
How to merge the data using merge statement and proc format? Is the result is same ?
Name validation tools used in SAS
What is difference between Global n Local Macro Variables..?
Describe the ways in which you can create macro variables?
what kind of variables are collected in AE dataset?
3 Answers Accenture, Quintiles, SAS,
What does proc print, and proc contents are used for?
how to debug and test the sas program? : Sas-administrator
How would you delete observations with duplicate keys?
Can we use where and having clauses in a single SAS program. ex: proc sql; select a,b,c from test where state in 'KA' and having <some condition>. Is the above program run correctly, if not why ?
/* This is example of age caluculate wihtout to display perfect days and years in output window */ data age; retain dob "12jun2003"d now "24may2011"d; age1=now-dob; age=(now-dob)/365.25; years=int(age); days1=round((age-years)*365.25); months=month(now)-1; if days1 gt 30 and months in(12,10,8,6,4,2)then do; month1=days1/30.4375; month=int(days1/30.4375); if day(now)=1 then days=1; else days=round((month1-month)*30.4375)+1; drop days1 month1 month; end; else if days1 gt 30 and months in (1,3,5,7,9,11)then do; month1=days1/30.4375; month=int(days1/30.4375); if day(now)=1 then days=1; else days=round((month1-month) *30.4375); drop days1 month1 month; end; drop age age1; proc print data=age; format dob now date.; run;