Generating a new column based on two columns

Hello! I have a list of award winners I'm working with, which includes a column of each winners' date of birth (call that Column A, which is in date format) , and another with the year winner won an award (call it Column B). I'm trying to create a new column describing the age at which each person won the award - so, Column B minus Column A - and am not quite sure how best to do that.

Any tips?

Hello! I have a list of award winners I'm working with, which includes a column of each winners' date of birth (call that Column A, which is in date format) , and another with the year winner won an award (call it Column B). I'm trying to create a new column describing the age at which each person won the award - so, Column B minus Column A - and am not quite sure how best to do that.

First, decide how you want to extend the award year to a complete date, whether that be Jan. 1, the date of the awards ceremony, or some month & day (because OpenRefine only works with complete dates).

Then, using the pulldown menu on Column B, select "Edit Column -> Add column based on this column..." with the expression:

diff(value.toDate(),cells['Column A').value),"years")

You may need to tweak things slightly depending what behavior you want for computing the age, but that should get you pretty close.

Tom

Thank you Tom! This was very helpful.