Yes, perfume and also after shave do go off. However, how long they last depend on the scent's chemical composition. Many perfumes don't have a set expiry date and can last anywhere between 1-10 years.
How long does aftershave stay good?
If you believe what the manufacturers tell you, the lifespan of cologne bottles is 24 – 36 months, depending on the brand. It will tell you on the base of your bottle, there's usually a sticker.
Does aftershave expire if unopened?
Bottom line: An unopened bottle of fragrance is good for 12 to 18 months, though a light scent—such as a citrus, one with fresh green notes, or a delicate floral—will most likely begin to turn sooner.