Cook! Expiration help...

Options
This is probably going to sound so bad, but I don't cook with these enough to know....and kinda bummed that they all seem to go bad before I use even half a container!

Are all these foods really not usable after the date on the box, or is it usually a sale by date etc? I know people who will keep sugar in the freezer FOREVER and still use it...but not sure about the rest. Thanks!

Flour
Xanum Gum
Protein Powder
Corn Meal