Q )the following program submitted
data work.DATA_INFO;
X="01JAN1960"D;
Run;
What will be the value of X?
A.the numeric value 0
B.the character value "01jan1960"
C.the date value 01011960
D.code contains a syntax error
What is the answer and explain how it comes?
Answer A. 01jan1960 is the value 0. 02jan1960 is 1, 03jan1960 is 2, etc.
Art, CEO, AnalystFinder.com
Answer A. 01jan1960 is the value 0. 02jan1960 is 1, 03jan1960 is 2, etc.
Art, CEO, AnalystFinder.com
Did you run the code an examine the data set?
Look up SAS Date values. This a key bit of knowledge to work with SAS and dates.
SAS calculates dates as the number of days since January 1, 1960. Here, the date is exactly January 1, 1960, which is 0 days. So the answer to this question is 0.
Hope this explanation makes sense!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.