Discussions

View Only

calculate duration between 2 dates

• 1.  calculate duration between 2 dates

Posted 01-13-2017 15:24
I just want to simply add how many days it is from from the start date to the end date.  I want the full duration, including weekends.

• 2.  RE: calculate duration between 2 dates

Posted 01-13-2017 15:49
Well in its simplest from that is a numeric formula field.

Todays([end date]-[start date])

• 3.  RE: calculate duration between 2 dates

Posted 02-28-2017 20:52
I have tried this and it still isn't calculating properly. The field is set as duration formula, should this be different?

• 4.  RE: calculate duration between 2 dates

Posted 02-28-2017 21:14
My formula sbive is for a formula numeric field. Change your field.m type to that.

• 5.  RE: calculate duration between 2 dates

Posted 01-13-2017 15:59
Todays([end date]-[start date]) + 1

• 6.  RE: calculate duration between 2 dates

Posted 01-13-2017 15:59
Thanks.  How would I do the above but saying but add one day?

• 7.  RE: calculate duration between 2 dates

Posted 01-13-2017 16:14
thanks again.  Another question on this.  I have a field called Budget Weeks.  I want to simply say Take Budget weeks * 7 (so I can get an approx number of days)

• 8.  RE: calculate duration between 2 dates

Posted 01-13-2017 16:15
Oh...never mind...figured it out!  Sum([Budget Weeks])*7

• 9.  RE: calculate duration between 2 dates

Posted 01-13-2017 17:39
why the sum?
Budget Weeks] * 7

• 10.  RE: calculate duration between 2 dates

Posted 06-20-2018 17:23

I am trying to get a duration as well and for some reason this is not working.

ToDays([Date Responded]-[Form Recorded Date])

It says expecting duration but found number? Both fields are date fields. I am thoroughly confused.

• 11.  RE: calculate duration between 2 dates

Posted 06-20-2018 17:31
Set the field to be type formula numeric.  It is set to be formula duration.

or if you really do want the result to be a duration field type, then get rid of the ToDays( ....

ToDays(  )  converts a Duration to the Numeric # of Days.

• 12.  RE: calculate duration between 2 dates

Posted 03-23-2019 20:27
This was super helpful! Thanks!! So I got the field to give me the amount of days between dates, is there a way to convert those days to months or years?

• 13.  RE: calculate duration between 2 dates

Posted 03-24-2019 01:53
It depends how accurate it needs to be as to the complexity if the formula. It also depends if you want decimals.

The low tech way to Years is to just divide by 365.25. For months to multiply by 12/365.25.

The actual syntax will depend on whether your days calculation is a duration field or a numeric field.