How do I calculate the difference between 2 dates?
Comments
-
Mike Wilday ✭✭✭✭✭✭
Are you wanting to get the number of calendar days or business days?
=networkdays([Column 8]23, [Column 8]25)
=netdays([Column 8]23, [Column 8]25)
Hope that helps!
-
Chris McKay ✭✭✭✭✭✭
Hi jretzlaff,
Is Column8 a date formatted column?
Based on the Start and Turnover values, I'd say no.
If you cell-link dates in from a Date column and they land in a Text/Number column, Smartsheet will not treat them as dates. So even though Mike's formulas are 100% correct, you'll still get an error.
To make matters worse, Smartsheet uses the base format (i.e. Date) when a formula is entered into a Date column (even if you don't restrict the column to dates). Again Smartsheet.... Why? Whyyyyyyyyy?
I'd suggest applying Mike's formulas to a Date column and restricting the cell-links to dates only.
Kind regards,
Chris McKay
Categories
Just a note here to say that based on the numerous reports to Support of customer impact, this change has been rolled back to the previous Milestone behaviour: tasks that have 0 duration and start at the end of the day will stay<\/strong> at the end of the day instead of moving over to the next day. <\/p> Thank you,<\/p> Genevieve<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":319,"urlcode":"functionality","name":"functionality"},{"tagID":439,"urlcode":"gantt-view","name":"Gantt View"}]},{"discussionID":109027,"type":"question","name":"CountIfs \/ OR Function for Sheet Summary Formula","excerpt":"Hello, I am trying to create a sheet summary formula that counts status columns if it meets the following criteria. However, I using this OR function doesn't work: =COUNTIFS(Status:Status, \"1. Qualification\", OR(Status:Status, \"2. Proposal \/ Tender\", OR(Status:Status, \"3. Waiting for Deposit\"))) Is there way to achieve…","snippet":"Hello, I am trying to create a sheet summary formula that counts status columns if it meets the following criteria. However, I using this OR function doesn't work:…","categoryID":321,"dateInserted":"2023-08-16T14:30:39+00:00","dateUpdated":null,"dateLastComment":"2023-08-21T08:40:21+00:00","insertUserID":153452,"insertUser":{"userID":153452,"name":"justdan2","url":"https:\/\/community.smartsheet.com\/profile\/justdan2","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-21T08:39:03+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":null,"lastUserID":153452,"lastUser":{"userID":153452,"name":"justdan2","url":"https:\/\/community.smartsheet.com\/profile\/justdan2","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-21T08:39:03+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":8,"countViews":76,"score":null,"hot":3384808260,"url":"https:\/\/community.smartsheet.com\/discussion\/109027\/countifs-or-function-for-sheet-summary-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109027\/countifs-or-function-for-sheet-summary-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109027,"commentID":391565,"name":"Re: CountIfs \/ OR Function for Sheet Summary Formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/391565#Comment_391565","dateInserted":"2023-08-21T08:40:21+00:00","insertUserID":153452,"insertUser":{"userID":153452,"name":"justdan2","url":"https:\/\/community.smartsheet.com\/profile\/justdan2","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-21T08:39:03+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-21T08:39:59+00:00","dateAnswered":"2023-08-16T15:31:46+00:00","acceptedAnswers":[{"commentID":390903,"body":" Try this:<\/p> =COUNTIFS(Status:Status, OR(@cell = \"1. Qualification\", @cell = \"2. Proposal \/ Tender\", @cell = \"3. Waiting for Deposit\"))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":109146,"type":"question","name":"Identify Workflow from ID?","excerpt":"Good morning, got a random one. Is there any way to identify what sheet or workflow an automation ran from? I got a rogue automation this morning, and I don't know what sheet it lives in. However, I noticed at the bottom of the email, there is an ID number, similar to a sheet or row ID. Is there any way, maybe with the…","snippet":"Good morning, got a random one. Is there any way to identify what sheet or workflow an automation ran from? I got a rogue automation this morning, and I don't know what sheet it…","categoryID":321,"dateInserted":"2023-08-18T14:25:47+00:00","dateUpdated":null,"dateLastComment":"2023-08-19T08:29:31+00:00","insertUserID":137019,"insertUser":{"userID":137019,"name":"Samuel Mueller","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Samuel%20Mueller","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B9G8B70WXQWC\/nKTI46EH9WQOM.jpg","dateLastActive":"2023-08-18T20:30:29+00:00","banned":0,"punished":0,"private":false,"label":"Overachievers"},"updateUserID":null,"lastUserID":161820,"lastUser":{"userID":161820,"name":"Hamza1","title":"Mr","url":"https:\/\/community.smartsheet.com\/profile\/Hamza1","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-20T04:58:20+00:00","banned":0,"punished":0,"private":false,"label":"Moderator"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":52,"score":null,"hot":3384804918,"url":"https:\/\/community.smartsheet.com\/discussion\/109146\/identify-workflow-from-id","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109146\/identify-workflow-from-id","format":"Rich","tagIDs":[227,334,448],"lastPost":{"discussionID":109146,"commentID":391519,"name":"Re: Identify Workflow from ID?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/391519#Comment_391519","dateInserted":"2023-08-19T08:29:31+00:00","insertUserID":161820,"insertUser":{"userID":161820,"name":"Hamza1","title":"Mr","url":"https:\/\/community.smartsheet.com\/profile\/Hamza1","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-20T04:58:20+00:00","banned":0,"punished":0,"private":false,"label":"Moderator"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/EYR2B79VH1AY\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-18T19:37:53+00:00","dateAnswered":"2023-08-18T19:10:30+00:00","acceptedAnswers":[{"commentID":391468,"body":" Yeah. That does sound like it could take awhile. Haha. And if you knew the sheet I'd, you'd be able to just jump to it in SS instead of needing the api.<\/p> Maybe a product enhancement request to expand the workflow portion of the api to include the sheet id is in order.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":227,"urlcode":"api-and-developers","name":"API and Developers"},{"tagID":334,"urlcode":"automations","name":"Automations"},{"tagID":448,"urlcode":"workflows-in-smartsheet","name":"Workflows in Smartsheet"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=321&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":4960,"limit":3},"title":"Trending in Smartsheet Basics","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">
<\/p>