Calculating Days
Answers
-
Mike Wilday ✭✭✭✭✭✭
Do you want workdays or calendar days?
Work Days =networkdays([Date Column 1]24, [Date Column 2]24)
Calendar Days =netdays([Date Column 1]24, [Date Column 2]24)
replace the Date Column 1 and Date Column 2 with the actual column name. 24 assumes this is row 24.
https://help.smartsheet.com/function/netdays
https://help.smartsheet.com/function/networkdays
Enjoy.
-
JLK ✭
I'm trying to do this and I keep getting the result of #INVALID DATA TYPE. I've checked my helper column properties, and both are "date". They have been defaulted to MM/DD/YY by smartsheet. Do I need a different date layout for the formula to work?
On a side note, when I originally import the data, my dates include timestamps, but because I know smartsheet doesn't play well with time, I've taken to adding helper columns that change it to just the date format... could the helper columns be the issue here?
-
Paul Newcome ✭✭✭✭✭✭
@JLKIt depends on what formula(s) you have in your helper columns. What formula(s) are you using exactly?
Come see me at ENGAGE 2023! I have "Happy to help️" buttons!
If you can't find me roaming the floor, I will most likely be at the 10xViz Partner Booth.
-
JLK ✭
Hi Paul,
Thanks for helping me figure this out. My formula for the helper column is:
=[name of column]@row
which should return exactly whats in my original date + timestamp column (formatted as: YYYY-MM-DD 00:00:00), but then I apply the column property of date and it returns just the MM/DD/YY
如果有一个更好的方法来做这个我all ears.
-
Paul Newcome ✭✭✭✭✭✭
Are you able to provide some screenshots for context?
Come see me at ENGAGE 2023! I have "Happy to help️" buttons!
If you can't find me roaming the floor, I will most likely be at the 10xViz Partner Booth.
-
JLK ✭
Here is the column as imported:
And here is the helper column formula: =[date applied (UCT)]@row
And here is what the helper returns:
It used to not return the time, but when I logged back in to get you these screenshots, the time appears to still be there, so probably the first step is getting rid of the times?
-
Paul Newcome ✭✭✭✭✭✭
So even though you are using a date column, you are still only populating a text string. To get just the date pulled out of the string and stored as a date value, you would use something like this:
=DATE(VALUE(LEFT([date applied (UTC)]@row, 4)), VALUE(MID([date applied (UTC)]@row, 6, 2)), VALUE(MID([date applied (UTC)]@row, 8, 2)))
Come see me at ENGAGE 2023! I have "Happy to help️" buttons!
If you can't find me roaming the floor, I will most likely be at the 10xViz Partner Booth.
帮助文章资源欧宝体育app官方888
Categories
Check out theFormula Handbook template!
See if this formula helps:<\/p>
=COUNTIF(Projects:Projects, CONTAINS(\"MTS\", @cell))<\/p>
Hope this helps!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","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":[]},{"discussionID":110703,"type":"question","name":"Column formula is not working.","excerpt":"Hello, I'm currently struggling with a column formula that, surprisingly, doesn't refer to any cell or range. Despite its simplicity, it's not functioning as expected. Here's the formula I'm working on: =IF(AND($[New break option date]@row >= [EndJanuary24]#, $[Contract start date]@row < [EndJanuary24]#), $[monthly rent…","snippet":"Hello, I'm currently struggling with a column formula that, surprisingly, doesn't refer to any cell or range. Despite its simplicity, it's not functioning as expected. Here's the…","categoryID":322,"dateInserted":"2023-09-24T14:30:03+00:00","dateUpdated":null,"dateLastComment":"2023-09-24T15:55:44+00:00","insertUserID":167283,"insertUser":{"userID":167283,"name":"VirgilT","title":"CEO","url":"https:\/\/community.smartsheet.com\/profile\/VirgilT","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKob-3bU1Y_H3yPdYcq2P5SJvthlxNHPqJwxbXEW88bi-Xs=s96-c","dateLastActive":"2023-09-25T01:01:20+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":167283,"lastUser":{"userID":167283,"name":"VirgilT","title":"CEO","url":"https:\/\/community.smartsheet.com\/profile\/VirgilT","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKob-3bU1Y_H3yPdYcq2P5SJvthlxNHPqJwxbXEW88bi-Xs=s96-c","dateLastActive":"2023-09-25T01:01:20+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":45,"score":null,"hot":3391137947,"url":"https:\/\/community.smartsheet.com\/discussion\/110703\/column-formula-is-not-working","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110703\/column-formula-is-not-working","format":"Rich","lastPost":{"discussionID":110703,"commentID":396714,"name":"Re: Column formula is not working.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/396714#Comment_396714","dateInserted":"2023-09-24T15:55:44+00:00","insertUserID":167283,"insertUser":{"userID":167283,"name":"VirgilT","title":"CEO","url":"https:\/\/community.smartsheet.com\/profile\/VirgilT","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKob-3bU1Y_H3yPdYcq2P5SJvthlxNHPqJwxbXEW88bi-Xs=s96-c","dateLastActive":"2023-09-25T01:01:20+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":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-25T08:08:06+00:00","dateAnswered":"2023-09-24T14:50:21+00:00","acceptedAnswers":[{"commentID":396712,"body":"