Try to use them within 10 minutes of grinding.
Personally, I tried an experiment and ground some beans to make a 1/2 cup of coffee and waited 2 hours, then I ground some to make another 1/2 cup 2 hours later. Then made coffee with each...I couldn't taste the difference between the coffee ground 2 hours ago vs the one I ground 2 minutes prior to making both coffees, and since I was making espresso, they both had an equal amount of crema.
I don't know what to think of all that; now had I waited a day I probably could have tasted and seen a difference?
Normally when I make coffee I grind it and then use it right away. When I go backpacking or bicycle camping I don't have the luxury of grinding the beans on trail, so I pre-grind my coffee for the amount that I'll need for the time I'll be out, pour the grounds into a zip-lock bag, get as much air out of the bag as I can, and throw it in my pack. Every morning on trail I'll make coffee using a GSI Ultralight Java drip coffee maker, and I can't taste the difference from drinking it the morning after my first night, to a week later on my last morning!
But I'm not a professional coffee taster, maybe a pro could tell the difference in the time waited after grinding, but I seriously doubt on a blind taste test anyone could tell the difference over waiting 2 hours to make coffee, maybe they could after a week if they did a side-by-side comparison? But a week without a side-by-side comparison the coffee seems to taste just as good on the first morning as it did on the last morning.