I have a sales table and a seperate products table that are related and i'm looking to create a column within the sales table that identifies the age of that product at the time of the sale.
For example if I sold a 2018 copyright product today, this column would spit out "1 year" or something of the like. However if I sold that exact same product in 2018 it would have been a "new" product at that time. I am then going to compare 1 year old product sales from 2018 to 1 year old product sales this year (and 2 year, 3 year, etc. ).
I have a copyright column for each product in my products table that tells me the copyright year and my sales table has an order date per product sale so it should be fairly straight forward to compare the dates (they are in different date formats - year vs date/time).
Marking this as solved with 1 minor change in the code. Since I am looking at past copyright dates, instead of the DATEDIFF = 1 for 1 year old copyrights, I changed it to the DATEDIFF equation = -1 and that seemed to work.