Ui Only formula field "AND"

  • 2
  • Question
  • Updated 2 years ago
  • Answered
I am trying create a ui only checkbox field that takes a date field and sees if it falls in between a start and end date field. I believe the formula should be wrapped with "AND" however that doesn't seem to be supported.

IF({{InvoiceDate}}>={{StartDate}},{{InvoiceDate}}<={{EndDate}}, 1,0) 
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb

Posted 2 years ago

  • 2
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
You could try a nested IF:
IF({{InvoiceDate}}>={{StartDate}},
IF({{InvoiceDate}}<={{EndDate}}, 1,0),
0)
Photo of Will.I.Yam

Will.I.Yam

  • 216 Points 100 badge 2x thumb
You can also use "&&" for AND as well as "||" for OR

Try this:
IF({{InvoiceDate}}>={{StartDate}}&&{{InvoiceDate}}<={{EndDate}}, 1,0) 
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Thank you both. I went with Will's answer but will keep both in mind for the future.