- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 10-22-2010 01:40 AM
(3266 views)
Hi,
In my data I have three variables - year, month and day that I want to combine into one date variable with the format ddmmyy8.
How can I do that?
Thanks - Bodil
In my data I have three variables - year, month and day that I want to combine into one date variable with the format ddmmyy8.
How can I do that?
Thanks - Bodil
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
use mdy function.
data test;
input month day year;
format new ddmmyy8.;
new=mdy(month,day,year);
datalines;
10 22 2010
10 23 2010
10 24 2010
;
run;
data test;
input month day year;
format new ddmmyy8.;
new=mdy(month,day,year);
datalines;
10 22 2010
10 23 2010
10 24 2010
;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I knew that a very easy solution was there somewhere... Thanks!