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
-
Help Article Resources
Categories
Check out the Formula Handbook template!