Data is entirely generated by the code via system function calls, without reading external files.
1 Code Block
DATA STEP Data
Explanation : Creation of the 'work.date' table and initialization of variables with the current date (CurrentDate), time (CurrentTime), and datetime (CurrentDateTime).
Copied!
data work.date;
CurrentDate=today();
CurrentTime=time();
CurrentDateTime=datetime();
run;
1
DATA work.date;
2
CurrentDate=today();
3
CurrentTime=time();
4
CurrentDateTime=datetime();
5
RUN;
2 Code Block
PROC PRINT
Explanation : Displaying the content of the 'work.date' table in the results.
Copied!
proc print data=work.date;
run;
1
PROC PRINTDATA=work.date;
2
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.