How to write something if today's date is between two dates ?
Hello,
I'm trying to have a box on my dashboard where the harvest season is written. So i need to write a function where Today's date is between two dates. For exemple: If today's date is between 2021/08/01 and 2021/10/30 i want to write "Wine". If the date is between 2021/08/01 and 2021/09/30 i want to write in my box "Cider".
My current function doesn't work :
=IF(Date@row > DATE(2021, 8, 1) AND(Date@row < DATE(2021, 10, 30), "Wine"))
Thank you
Grégoire Cadet
Best Answer
-
Try something like this then...
=IF(AND(TODAY()>= DATE(2021, 08, 01), TODAY()<= DATE(2021, 09, 30)), "Wine/Cider", IF(AND(TODAY()>= DATE(2021, 10, 01), TODAY()<= DATE(2021, 10, 30)), "Wine"))
Answers
-
Based on today being 25 Aug, would you want "Wine", "Cider", or "Wine/Cider" output since both wine and cider cover today's date?
-
If it is possible, "Wine/Cider"
Thank you
GC
-
Try something like this then...
=IF(AND(TODAY()>= DATE(2021, 08, 01), TODAY()<= DATE(2021, 09, 30)), "Wine/Cider", IF(AND(TODAY()>= DATE(2021, 10, 01), TODAY()<= DATE(2021, 10, 30)), "Wine"))
-
It works for me,
thank you a lot !
GC
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65K Get Help
- 443 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 129 Brandfolder
- 150 Just for fun
- 70 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!