# Discussions

View Only

## Calculate total number of days between today and [Date in Pipeline] excluding weekends.

• #### 1.  Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 19:34
Hello! I need help on this.

Calculate total number of days between Today and [Date in Pipeline] excluding weekends.

I have the below formula, but I get an error message saying "Expecting text/datetime/workdate but found date"

WeekdaySub (Today(),ToDate([Date in Pipeline]))

• #### 2.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 19:55
Is your formula field a numeric data type? I believe WeekDaySub yields a numeric value.

• #### 3.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 20:56
I have a Duration field type. I also have this formula Today() - [Date in Pipeline] but it doesn't exclude weekends. _

• #### 4.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 20:59
See Chris's comment below. If the [Date in Pipeline] is just a date type field already, you do not have to try to make it a date field again.

try this

WeekDaySub (Today(),[Date in Pipeline])

• #### 5.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 21:04
Hello!

I tried that formula but it gave me an error saying "Expecting duration"

• #### 6.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 21:22
Do you really want it to be a formula duration field type?  I suggest making it a formula numeric field type and it will be the number of days in the pipeline.

• #### 7.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 22:02
I got it! Thank you and to Chris for the help

• #### 8.  RE: Calculate total number of days between today and [Date in Pipeline] excluding weekends.

Posted 08-22-2018 19:58
You may have also wrapped ToDATE() around a regular date field. You don't need to do that.