Not sure how long, but I have grain crushed for 6 months with no noticeable difference. Not sure what has changed but years ago it was considered better to crush grains a week or more before you needed to use them.
The secret is to to stop it absorbing moisture otherwise in Brewspeak it becomes Slack. I think I remember reading that three months is the longest advisable storage period in ideal conditions.
Thanks for the input everyone. Making my own malt and read some place about storing it in paper bags for six weeks be for use.but didn't say ground or whole.
I keep my grain (whole and crushed) in a plastic bin with a lid and I place one of THESE demudifiers on top of the bags of grain in the bin to keep it dry.