How do I subtract days from a date
I'm trying to build a production schedule spreadsheet. In one column I have the date the production item needs to be completed. In the next column I have the number of days (just a whole integer number) needed to complete. I would like to use a formula to determine the date production needs to begin. Simply (Date to be complete) - (Days to complete).
In excel I can subtract an integer from a date and it will treat the integer as days. So, for example, [3/9/2023 - 12] would result in 2/25/2023. But when I try to subtract an integer from a date in SmartSheet it gives an error #INVALID COLUMN VALUE
Answers
-
Make sure the column you are putting the formula in is set as a date type column.
-
Did you ever figure this out? I'm trying to do the exact same thing.
-
Oh wait I figured it out! Make sure the field you're putting the formula in is a Date field. then it's just:
=[FIELD_NAME]@row - [FIELD_NAME_2]@row
Attached an image of mine. Everything in the brackets [] is a field name. First field is a Date field, second field is an integer (26, -103, etc.).
-
@steph_aw Yes. The column containing the date and the column containing the formula (that outputs a date) must be set as date type columns and how data that is being stored as a date (not a text string that just looks like a date).
The particular error mentioned in the original post typically comes from trying to output a date value in a non-date column.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!