Hi there!
I have a dataset that would be very simply formatted in the example below:
ID. Appt_Type. A1_Date. NewDate
1. 5. 01JAN2009
2. 7 11APR 2007
3 6 22FEB2008
4. 5 23AUG2004
Essentially, I want to create a new column that copies over the date if a certain criteria regarding the appt type is met. I've been using if, then statement but cannot get the date to copy over.
i.e. If appt_type=5, then I want NewDate to equal the value in A1_Date, so NewDate would be 01JAN2009 for ID 1 and 23AUG2004 for ID 4.
Simple question, but I can't seem to find the right code 🙂