Looking to create an =IF(CONTAINS Function for a formatted Date field
Hello!
I'm looking to create an =IF(CONTAINS function to pull the day of the week into a separate column from the formatted date column.
For example:
I want the "Event Day" column to turn Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday depending on what is in the Event Date column.
I have created this formula, but cannot turn any results - doesn't turn unparseable but just leaves cell blank even when it should be applicable. (haven't done for all 7 days of the week yet to leave less room for error):
=IF(CONTAINS("Mon", [Event Date]@row), "Monday", IF(CONTAINS("Tue", [Event Date]@row), "Tuesday", ""))
We were able to get this function to work, but this is only applicable for one day of the week and we have not been able to duplicate it for all the days of the week.
=IF(CONTAINS("Mon", [Event Date]:[Event Date]), "True", "Mon")
Is anyone able to correct my function or provide alternate suggestions? The reason we want to pull this data is to get this day of the week into Smartsheet Dynamic, as we have learned that Dynamic only allows the date to be formatted in one way in the view, regardless of the formatting in the source report, and it does not include the day of the week. Thank you!
Best Answer
-
Hi Chantal,
Try:
=IF(weekday([event date]@row)=1, "Sunday", IF(weekday([event date]@row)=2, "Monday", IF(weekday([event date]@row)=3, "Tuesday", IF(weekday([event date]@row)=4, "Wednesday", IF(weekday([event date]@row)=5, "Thursday", IF(weekday([event date]@row)=6, "Friday", "Saturday"))))))
Work?
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
Answers
-
Hi Chantal,
Try:
=IF(weekday([event date]@row)=1, "Sunday", IF(weekday([event date]@row)=2, "Monday", IF(weekday([event date]@row)=3, "Tuesday", IF(weekday([event date]@row)=4, "Wednesday", IF(weekday([event date]@row)=5, "Thursday", IF(weekday([event date]@row)=6, "Friday", "Saturday"))))))
Work?
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
-
Yes this worked - thank you so much!
-
Excellent. Thank you for contributing to the Community.
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!