Hi there,
I'me havind some trouble summing some dates.
I have a table with a column with Begin_Date and another colunm with
Maturity_Lenght.
I need to create another column with the End_Date, by adding the
Maturity_Lenght to the Begin_Date.
Begin_Date         Maturity_Lenght (month)            End_Date
02-05-2008                        1
02-06-2008
05-05-2008                        3
05-08-2008
                                .....
How can I do that?
data mylib.txcp_copy;
SET mylib.txcurtoprazo;
IF      Prazo='D01'     THEN DO
       End_Date=Data_valor+1;
       END;
IF      Prazo='D07'     THEN DO
       End_Date=Data_valor+7;
       END;
IF      Prazo='D14' THEN DO
       End_Date=Data_valor+14;
END;
/* adding 3 months to the iniciao date (data_valor)*/
IF      Prazo='M03'     THEN DO
end_date=intnx('month',Data_Valor,3,"sameday");
       END;
run;