Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, pleaseVisit the Current Forums.

Calculating Durations

Eid E. Eid
Eid E. Eid ✭✭
edited 12/09/19 inArchived 2015 Posts

I have columns in my sheet with "Departure TIme" and "Arrival Time" in the format hh:mm

Since there is no "Time" Type for the columns, so I had to kep the Column Type as Number/Text

I am looking for a way to substract these 2 columns to obtain the duration of the trip.

Many thanks for any help

Comments

  • Hi Eid E. Eid -

    Currently, there isn't a way to use formulas with values formatted as hh:mm (as the : will make the value a text string). Our Product team is looking in to building a time formatted column type and I've just added your vote to this category on the request list.

    Thanks,

    Sonia

  • @SoniaRplease add my vote as well. This new functionality is much appreciated

  • Joel Johnson
    edited 10/16/15

    Put my vote on this too.

    I have done a work around for simple duration calculations, and posted it in the below discussion:

    https://community.smartsheet.com/discussion/time-calculation

  • Eid and group,

    This exact problem can be solved usingAzuqua, an integration partner of Smartsheet. I work for Azuqua and the logging timestamp in a column based on a checkbox being marked (checked) is one of the many scenarios that we enable inside of Smartsheet.

    Using Azuqua you can set up a monitor for a change to column and in your particular case check to make sure the checkbox has been marked and then confirming the checkbox has been marked a timestamp / date will be entered into the column you specify.

    For your use case you would set up a checkbox for both departure and arrival. When you mark those checkboxes Azuqua will log a timestamp for each of those actions into the columns you specify and then using a formula you get the exact duration.

    If you want to learn more please visit our app listing at Smartsheet here:

    //www.santa-greenland.com/apps/azuqua

    Please feel free to follow up with any questions.


    -Patrick

This discussion has been closed.
I understand. Unfortunately, there is no other option that I see. One thing to make it easier for you to add the name is to have a helper column in the source sheet with a formula to identify duplicates. If there is a record with no duplicate (i.e., a new name added), you can get notified through a workflow and use that to add the name to your metric sheet.<\/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":[]},{"discussionID":106984,"type":"question","name":"Using Countif to count Often and Very Often,","excerpt":"however I can't get it to work the Often is also counting the Very Often: =COUNTIF([Tools & Resources (SE-2)]8:[Tools & Resources (SE-2)]12, HAS(\"Often\", @cell), NOT(HAS(\"Very\", @cell)))","snippet":"however I can't get it to work the Often is also counting the Very Often: =COUNTIF([Tools & Resources (SE-2)]8:[Tools & Resources (SE-2)]12, HAS(\"Often\", @cell), NOT(HAS(\"Very\",…","categoryID":322,"dateInserted":"2023-06-27T22:21:22+00:00","dateUpdated":"2023-06-27T22:25:38+00:00","dateLastComment":"2023-06-27T22:37:19+00:00","insertUserID":13941,"insertUser":{"userID":13941,"name":"steinkj","title":"","url":"https:\/\/community.smartsheet.com\/profile\/steinkj","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2017-04\/84\/c0\/n84c060f2d4e16db2de757af80ad4cdca.png","dateLastActive":"2023-06-27T22:35:42+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"updateUserID":13941,"lastUserID":13941,"lastUser":{"userID":13941,"name":"steinkj","title":"","url":"https:\/\/community.smartsheet.com\/profile\/steinkj","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2017-04\/84\/c0\/n84c060f2d4e16db2de757af80ad4cdca.png","dateLastActive":"2023-06-27T22:35:42+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":24,"score":null,"hot":3375811121,"url":"https:\/\/community.smartsheet.com\/discussion\/106984\/using-countif-to-count-often-and-very-often","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106984\/using-countif-to-count-often-and-very-often","format":"Rich","lastPost":{"discussionID":106984,"commentID":382723,"name":"Re: Using Countif to count Often and Very Often,","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382723#Comment_382723","dateInserted":"2023-06-27T22:37:19+00:00","insertUserID":13941,"insertUser":{"userID":13941,"name":"steinkj","title":"","url":"https:\/\/community.smartsheet.com\/profile\/steinkj","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2017-04\/84\/c0\/n84c060f2d4e16db2de757af80ad4cdca.png","dateLastActive":"2023-06-27T22:35:42+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-28T09:04:26+00:00","dateAnswered":"2023-06-27T22:35:14+00:00","acceptedAnswers":[{"commentID":382720,"body":"

Hi @steinkj<\/a>, change the \"HAS\" to an equal.<\/p>


<\/p>

=COUNTIF([Tools & Resources (SE-2)]8:[Tools & Resources (SE-2)]12, \"Often\")<\/p>"},{"commentID":382723,"body":"

Thank you, as always I was trying to make it too hard!!!!<\/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":106939,"type":"question","name":"How to extract part of a cell and remove the rest","excerpt":"Hello I have a very long column with various texts in every cell containing for example 'Data change request from John Smith', every cell contains different types of requests and I want to extract to another column only the text before the word 'request '. Could you please help me how to do this? Thank you so much!","snippet":"Hello I have a very long column with various texts in every cell containing for example 'Data change request from John Smith', every cell contains different types of requests and…","categoryID":322,"dateInserted":"2023-06-27T09:11:14+00:00","dateUpdated":null,"dateLastComment":"2023-06-28T09:51:15+00:00","insertUserID":143328,"insertUser":{"userID":143328,"name":"Christiana Gkini","url":"https:\/\/community.smartsheet.com\/profile\/Christiana%20Gkini","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtf-hNm8WhOgG9NXB7Zou6oQaUyDHZZ2iwrHmrrz=s96-c","dateLastActive":"2023-06-28T10:00:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":151203,"lastUser":{"userID":151203,"name":"Nick Korna","url":"https:\/\/community.smartsheet.com\/profile\/Nick%20Korna","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-28T10:04:09+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":27,"score":null,"hot":3375804749,"url":"https:\/\/community.smartsheet.com\/discussion\/106939\/how-to-extract-part-of-a-cell-and-remove-the-rest","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106939\/how-to-extract-part-of-a-cell-and-remove-the-rest","format":"Rich","lastPost":{"discussionID":106939,"commentID":382775,"name":"Re: How to extract part of a cell and remove the rest","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382775#Comment_382775","dateInserted":"2023-06-28T09:51:15+00:00","insertUserID":151203,"insertUser":{"userID":151203,"name":"Nick Korna","url":"https:\/\/community.smartsheet.com\/profile\/Nick%20Korna","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-28T10:04:09+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-28T09:27:10+00:00","dateAnswered":"2023-06-27T11:27:01+00:00","acceptedAnswers":[{"commentID":382494,"body":"

Hi @Christiana Gkini<\/a>,<\/p>

If the format of the entries is consistent then you can use a formula similar to this:<\/p>

=LEFT([Column to check]@row, (FIND(\"request\", [Column to check]@row) - 2))<\/p>

Example:<\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n

Obviously you will probably need to change the \"Column to check\" in the formula, but this should be straightforward enough.<\/p>

Hope this helps; any questions or issues then just post! 😊<\/span><\/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":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&siteSectionID=0&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":10000,"limit":3},"title":"Trending Posts","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending Posts