09-27-2011 11:42 AM
I have two tables test1 and test2 and need to join two tables by id and birthdat
(only by month and year not by date).The date formats are different in both the table.
Please let me know.
09-27-2011 11:53 AM
I'm confused! Given your example, what would you expect your output to be? If they are both SAS dates, the format should be irrelevant and the month and year functions can be used. But I don't understand what result you are attempting to achieve.
09-27-2011 12:31 PM
So you do NOT have two date fields. The first dataset has a number like 19,400,420 that you want to interpret as the date 1940/04/20.
To convert it use
bthdate = input(put(pthdate,z8.),yymmdd8.);
format bthdate yymmdd10.;
Also I am confused about dataset two. You say the format is MMDDYY10., but the dates you listed are have day before month.
09-27-2011 01:41 PM
Actually two appear that way and the third one appears to be mmddyy. There is also the possibility that the big numbers represent datetime values but, if so, they are all from 1960. I still don't have any idea of what the OP wants as a result.
Raveena, can you let us know?
09-28-2011 04:41 PM
I would like to skip this question. Even I am not so clear with this requirement.
Thanks for your valuable time in response for this question.