Leftovers can be kept for three to four days in the refrigerator. Be sure to eat them within that time. After that, the risk of food poisoning increases. If you don't think you'll be able to eat leftovers within four days, freeze them immediately. Food poisoning — also called foodborne illness — is caused by harmful organisms, such as bacteria in contaminated food.
http://www.mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/expert-answers/food-safety/faq-20058500
The actual term Expiration Date refers to the last date a food should be eaten or used. Last means last -- proceed at your own risk. Other, more commonly spotted terms are:  1 Sell by date. 2  The labeling sell by tells the store how long to display the product for sale. 3  You should buy the product before the date expires. 4  This is basically a guide for the retailer, so the store knows when to pull the item.
http://www.webmd.com/a-to-z-guides/features/do-food-expiration-dates-matter
Kitchen Fact: Cooked food stored in the refrigerator should be eaten in 3 to 4 days. After food is cooked, it should sit out at room temperature no more than two hours before being refrigerated to slow down bacteria growth. But once stored in the fridge, leftovers should be eaten up within three to four days because bacteria can still grow even at refrigerator temperatures. To help you remember how long something has been in the fridge, we recommend labeling it with the date it was cooked to help you keep track!
http://www.thekitchn.com/how-long-can-you-keep-cooked-foods-in-the-refrigerator-kitchen-facts-219384
Uncooked foods, such as cold salads or sandwiches, also should be eaten or refrigerated promptly. Your goal is to minimize the time a food is in the danger zone — between 40 and 140 F (4 and 60 C) — when bacteria can quickly multiply. When you're ready to eat leftovers, reheat them on the stove, in the oven or in the microwave until the internal temperature reaches 165 F (74 C).
http://www.mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/expert-answers/food-safety/faq-20058500
1 The precise answer to the question “How long does cooked salmon last?” depends to a large extent on storage conditions — refrigerate salmon within two hours of cooking.
http://stilltasty.com/fooditems/index/18244
So, hot food should be served straight after cooking to keep it above 60°C, and anything not eaten immediately should be chilled to below 4°C as soon as possible. To avoid the food danger zone, leftovers should be put into the fridge as soon as possible after cooking, ideally while still very hot.
http://www.bestrecipes.com.au/article/how-long-to-store-leftovers-a1466.html
1 How long does cooked salmon last at room temperature? 2  Bacteria grow rapidly at temperatures between 40 °F and 140 °F; cooked salmon should be discarded if left for more than 2 hours at room temperature.
http://stilltasty.com/fooditems/index/18244
As a general rule, food should be eaten within two to three days of cooking. However, food safety guidelines are influenced by what the leftovers are, where they were cooked, and how long they were left on the counter before going into the fridge.
http://www.bestrecipes.com.au/article/how-long-to-store-leftovers-a1466.html
1 This date is recommended for best flavor or quality. 2  It is not a purchase or safety date. 3  Sour cream, for instance, is already sour, but can have a zippier, fresh taste when freshly sour (if that's not an oxymoron!).  4 Born on date. 5  This is the date of manufacture and has been resurrected recently to date beer.
http://www.webmd.com/a-to-z-guides/features/do-food-expiration-dates-matter
1 The labeling sell by tells the store how long to display the product for sale. 2  You should buy the product before the date expires. 3  This is basically a guide for the retailer, so the store knows when to pull the item.
http://www.webmd.com/a-to-z-guides/features/do-food-expiration-dates-matter
how long can you eat food after cooking it
You can eat food for 3 to 4 days after cooking it.