Pure vanilla extract has an indefinite shelf life, while imitation vanilla extract can be stored for two to four years. Because these items are labeled with a "best by" date and not a "use by" date, any issue with shelf life of these products deals with quality and not safety.
Vanilla extract should have a pleasant vanilla odor. If vanilla extract does not have a strong vanilla odor, it is no longer effective as a flavoring agent. Old vanilla extract can also take on a cloudy appearance. While vanilla extract that has these qualities can still be used, it does not impart a vanilla flavor into foods.