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

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered
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]))
Photo of Noelle Divinagracia

Noelle Divinagracia

  • 100 Points 100 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
Is your formula field a numeric data type? I believe WeekDaySub yields a numeric value. 


Photo of Noelle Divinagracia

Noelle Divinagracia

  • 100 Points 100 badge 2x thumb
I have a Duration field type. I also have this formula Today() - [Date in Pipeline] but it doesn't exclude weekends. 
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,466 Points 50k badge 2x thumb
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])


Photo of Noelle Divinagracia

Noelle Divinagracia

  • 100 Points 100 badge 2x thumb
Hello!

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

Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,466 Points 50k badge 2x thumb
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.

 
Photo of Noelle Divinagracia

Noelle Divinagracia

  • 100 Points 100 badge 2x thumb
I got it! Thank you and to Chris for the help
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
You may have also wrapped ToDATE() around a regular date field. You don't need to do that.