🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 10-10-2017 06:59 PM
(1751 views)
I am trying to create a function that creates a numeric variable called BirthDt that basically combines the BirthYear, BirthMonth and BirthDay into one numerical variable, ie so the BirthDt for the first observation would be 199. I am struggling with which function to actually use for this. Any advice?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
MDY is the one to use here:
BirthDate = mdy(BirthMonth, BirthDay, BirthYear);
format BirthDate date9.;
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
MDY is the one to use here:
BirthDate = mdy(BirthMonth, BirthDay, BirthYear);
format BirthDate date9.;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! That worked perfectly. There are so many date functions, I was struggling finding one to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Good to hear. You are right, there are a lot of date functions and it can be hard to find a suitable one.