Generally, there is a rule of 15the (http://coffeegeek.com/forums/coffee/questions/543604Rule of 15).
Green coffee lasts fresh for 15 months, roasted (stored in an opaque, air-tight, slightly-below-room-temp container) 15 days and ground 15 minutes.
This applies mainly to specialty coffee since it has the most aromas and tastes. Even if you open a bag of beans and do not grind them, once the air reaches the beans you can notice that taste degrades in few days. You would have to get most of the air of the container so that the coffee lasts 15 days mentioned above.