"Use by" dates indicate when food must be eaten by for health or safety reasons. According to Food Standards Australia New Zealand, FSANZ, "Foods should not be eaten after the use-by date and can’t legally be sold after this date because they may pose a health or safety risk." You shouldn’t eat any food that is past its "use by" date, even if it looks and smells okay.
A helpful way to remember the difference is that "use by" dates are mainly to determine the safety of food, whereas "best before" dates are mainly used to determine the food’s quality.
"Best before" dates on foods indicate when they should be eaten by before it starts deteriorating in quality. They will be safe to eat right up to this date as long as they have been stored properly.
You might see food sold in shops past its "best before" date. Legally they can still be sold as long as the food is fit for human consumption. The positive is you’ll often find such products reduced in price.
Bread differs in that they can be labelled with a "baked on" date or "baked for" date if its shelf life is less than seven days.
Interestingly, some foods that have a shelf life of two years or longer (such as canned food) don’t need to be labelled with a "best before" date. According to FSANZ, it is hard to provide an accurate guide as to how long these foods will keep. It states, "They may retain their quality for many years and are likely to be consumed well before they spoil."
The packet should also indicate any specific storage conditions required to keep the product until its "best before" or "use by" date. For example, "This cheese should be kept refrigerated".
If you grab a product at the shops and its packaging is damaged, such as with dents, leaks or tears, don’t buy it as it might be contaminated with bacteria.