'Filtering for close dates in the next 30 days based on current date in R
I am having an issue filtering for dates only in the next 30 days based on todays date in R. The close date column I want to filter on is already set to a date type and is in the format Year-Month-Day
(2022-06-22).
I want to be able to use records that have a close date of the next 30 days from today's date.
x_data %>% filter(CloseDate > today())
This only shows anything greater than todays date, but I want it to be specific to only the next 30 days from today.
Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|