DATA Step, Macro, Functions and more

Why is the program not printing the dates?

Reply
Occasional Contributor
Posts: 13

Why is the program not printing the dates?

 

data date;
input day month year;
date = mdy(day, month, year);
format date mmddyy10.;
datalines;
25 12 2005
21 10 1946 
;
proc print data=date;
run;

Untitled.png

 

Super User
Super User
Posts: 8,075

Re: Why is the program not printing the dates?

[ Edited ]

Last I checked there isn't a month number 25.  The letters in the MDY() function stand for Month,Day,Year.

mdy(month, day, year)
Occasional Contributor
Posts: 13

Re: Why is the program not printing the dates?

But the months are 12 and 10.. right?
Super User
Super User
Posts: 8,075

Re: Why is the program not printing the dates?


b384b7 wrote:
But the months are 12 and 10.. right?

If you call MDY(25,x,y) then the MONTH is 25.

Ask a Question
Discussion stats
  • 3 replies
  • 90 views
  • 0 likes
  • 2 in conversation