How to find Number of months between two given dates

If we want to set Yes if the Customer placed an order within last 24+ months and set No if the Customer placed an order within last 24 months in a Transaction saved search.

CASE  WHEN ROUND(MONTHS_BETWEEN(CURRENT_DATE, {customer.lastorderdate}),0 )>24 THEN 'YES' ELSE 'NO' END

Leave a comment

Your email address will not be published. Required fields are marked *