05-24-2012 02:46 PM
I'm trying to add a new date variable to a SAS data set.
While the code does run, the output is incorrect. I keep getting dates that are like in 1950s.
Is anybody able to assist?
A1 is another date column in the dataset.
05-24-2012 04:14 PM
Did you assign a date format such as mmddyy10. to the new variables? The integer values stored for dates in the third calendar quarter of 2011 (guessing from your dataset name) would be 18901 to 18993.
What results are you getting?
05-24-2012 05:35 PM
if the format year part of your date is in 2 digits, you may want to check out your cut off date, then adjust it accordingly.
proc options option=yearcutoff;
05-24-2012 10:54 PM
I noticed you used
Do you come from JAVA Forum at Oracle.com ? I also am there for a couple of days.
Now Focus on your question.
You did give us sample data and result you want.So just guess it.
which means start_date and end_date both equal to A1, do you want it ?
Or you should change the order of these .
about '1950' , you can use some format or function year(A1) to get it .