How do I create another IF formula for this Field.

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

  ToDate([Date Created]) 

+ IF(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1))

+ IF([SLA Expectation] = SBD = ToDate([Date Created]) 


So I am trying to make an IF formula if a another field is Equal to SBD then it need to be a different date. 

So SBD(Same Business day) for ETA expectations needs to be the same day as Date created. and I am still new to QB and i can't seem to get the formulas down. 

Photo of Charles

Charles

  • 0 Points

Posted 4 years ago

  • 0
  • 1
IF( [SLA Expectation] = "SBD", ToDate([Date Created]),


ToDate([Date Created]) 

+ IF(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1)))



QuickBase evaluates the conditions you list in sequence, and the does the first one that is true.  So we first test the SLA Expectation condition and if that is not true, then it moves on the to the "else" calculation.
Photo of Charles

Charles

  • 0 Points
Getting an error with this. So I moved it to the top and I and I am still getting a syntax error
Can you post your formula?
Photo of Charles

Charles

  • 0 Points
IF([SLA Expectation] = "SBD", ToDate([Date Created]))


ToDate([Date Created])

+ IF(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1))
you are missing a closing )
Photo of Charles

Charles

  • 0 Points
IF([SLA Expectation]) = "SBD", ToDate([Date Created])
Photo of Charles

Charles

  • 0 Points
Is that right?
Now I am confused.  I assumed that you were asking for the formula to first check if the Service Level Agreement was Same Business Day,  if so, then its gotta be the same day, regardless of the time of day, else you wanted the regular calculation.

So now I'm not understanding your question and the business logic you are trying to put into the formula.
Photo of Charles

Charles

  • 0 Points
If([SLA Expectation] = "SBD", ToDate([Date Created]))

ToDate([Date Created])

+ If(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1))

Is my formula.

Everything above is what I want it to do. SBD to be the same as Date Created. and then the else be like it is. I can get this formula to work if I don't include the IF for SBD.
... and my response was that you missed the closing )

The post I did for the formula ended in ))) and your ends in just ))


IF(
[SLA Expectation] = "SBD", ToDate([Date Created]),
ToDate([Date Created])
+ IF(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1)))
Photo of Charles

Charles

  • 0 Points
This is what your saying right

If([SLA Expectation] = "SBD", ToDate([Date Created])

ToDate([Date Created])

+ If(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1)))

Cause this is what I have currently and its still giving me an error.

I am still trying to learn all this.
Sorry, there was a missing comma
If([SLA Expectation] = "SBD", ToDate([Date Created]),

ToDate([Date Created])

+ If(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1)))