How to compare 2 date field see if in the same quarter

I would like to filter out those tickets closed in different quarter compared with created time.
But I cannot find a way to extract the quarter from date field.