# How do I create another IF formula for this Field.

• 0
• 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.

• 0 Points

Posted 4 years ago

• 0
• 72,488 Points
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.
• 0 Points
Getting an error with this. So I moved it to the top and I and I am still getting a syntax error
• 72,488 Points
Can you post your formula?
• 0 Points
IF([SLA Expectation] = "SBD", ToDate([Date Created]))

ToDate([Date Created])

+ IF(ToTimeOfDay([Date Created])> ToTimeOfDay("9:00 pm"), Days(2), Days(1))
• 72,488 Points
you are missing a closing )
• 0 Points
IF([SLA Expectation]) = "SBD", ToDate([Date Created])
• 0 Points
Is that right?
• 72,488 Points
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.
• 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.
• 72,488 Points
... 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)))
• 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.
• 72,488 Points
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)))