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
- Smartsheet Customer Resources
- 62.1K Get Help
- 352 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 135 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 443 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 284 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!