Properly stored grain can last a long time. Certainly years. Keep it cold, and well sealed.
Personally I don't buy more than I can use in a few months however. Some of those bags of grain sit in warehouses for a long time undergoing wide temperature swings.
As for the wheat, crush some and taste/smell it. If it went bad you will know. Depends on how it was stored.