Discussions

Expand all | Collapse all

create a formula that will tell me how many days a task was open

  • 1.  create a formula that will tell me how many days a task was open

    Top
    Contributor
    Posted 07-20-2017 14:47
    I am trying to create a formula that will tell me how many days a task was open whether or not its status is complete. In other words, if the project is complete it should calculate total days it was open and if its still in progress it should return number of days based on todays date.


  • 2.  RE: create a formula that will tell me how many days a task was open

    Bronze
    Contributor
    Posted 07-20-2017 14:59
    You could probably do this with a form rule and a formula duration field. Basically the form rule would update a date field when the status changes called Date of Status or something. Then in your formula field you can either compare that date to today or the date of status to today.

    If status is complete then it should get number of days between the date is created to the date it was marked as completed otherwise it should show the number of days since the date it was created to today.

     If thats correct logic try the code below.

    Code not tested

    IF([Status]="Complete",  ToDate([Date Created]) - ToDate([Date Status]) , Today() - ToDate([Date Created])


  • 3.  RE: create a formula that will tell me how many days a task was open

    Top
    Contributor
    Posted 07-20-2017 18:08
    thanks