Excerpted from:

First, there are several terms stamped on the food. This is what they mean:
SELL BY: How long a store should display the product for sale. This is a guide for the store. It is optimum quality date, but food is still edible for a while after.
BEST IF USED BY OR BEFORE DATE: This is only about quality, not safety.
GUARANTEED FRESH DATE: This usually refers to bakery items. They will still be edible after that date.
USE BY DATE: This is the last recommended day to use the product at peak quality. It is still edible after this.
PACK DATE: This is on canned and packaged goods. This actually might not be clear as sometimes it’s in code. It can be done by month-day-year as MMDDYY. Or it could be Julian calendar for the year by day, which means January is numbered 001-0031. December would be 334-365.
Foods not to eat past their expiration date?
Eggs. Deli meat. Mixed greens. Alfalfa sprouts. Oysters. Shrimp. Raw ground beef. Berries. Soft cheese. Chicken.
So how long is food usually good for?
Milk: a week after Sell By.
Eggs: Three to five weeks after you buy them. Double-grade A will go down a grade in a week, but are still edible.
Poultry and seafood: Cook or freeze within a day.
Beef and pork: Cook or freeze within three to four days.
Canned good: High acid foods such as tomato sauce can last to 18 months. Low acid such as canned green beans can last for five years. However, do not store these in a hot space. A dry, cool place, is best.