Assuming these are numeric date variables
data want;
set have;
if '20JUL2022'd <= date <= '31AUG2022'd;
run;
Please provide data as working SAS data step code from now on. You can follow these instructions or type the working SAS data step code yourself. Doing this avoids us having to make assumptions or guesses about your data (which might be incorrect), which makes it much more likely that people can provide correct answers; this helps you and helps us.
--
Paige Miller