I'm having more date issues. I need to add a certain amount of months to a date, and the convert it to the 'YYYYMM' format. I can do this in PROC SQL if I'm pulling data from the oracle db. Once I have a work table in SAS though I can no longer do this. The proc sql doesn't recognize the to_char function or the add_months function. I don't know how to do the equivalent in SAS. Basically, if I have a date 16SEP2012:00:00:00 I need to add months to it, than convert it to a 'YYYYMM' format. So in my code below, if RECALL=2, then I would add two months to the date above, and then convert it to YYYYMM. I'd end up with 201211 (december 2011). Here's what I'm doing: PROC SQL; UPDATE PL.TREATMENT_PLANS_ADJ_RECALL SET RECALLDATE1=TO_CHAR(ADD_MONTHS(R.RECALLDATE, RECALL),'YYYYMM'); RUN; If I were connecting to Oracle it would work. But I can't connect to Oracle because that's not where my table is. Thanks for helping out this SAS date newbie!
... View more