Skip to main content
Question

DateTime Formula

  • October 28, 2022
  • 0 replies
  • 158 views

Forum|alt.badge.img+8
Hi!

I am trying to make a formula with DateTime fields that says if Date A plus 14 days     is     less than or equal to     Date B then return  "Overnight Shipping     else     return "Normal Shipping"


I am using a text formula field and this is what I have so far

IF(ToTEXT(WeekdayAdd(ToDate([Date A]),+14) <= [Date B], "Overnight Shipping","Normal Shipping"))

It is giving me the error on the <= saying "The operator '<=' can't be applied on types date, datetime. 


Does anyone know how to get past this?

------------------------------
NOEL HODGES
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
try this

IF(ToDate([Date A]) + Days(14)  <= ToDate([Date B]), "Overnight Shipping","Normal Shipping"))

I assume that you actually want 14 Calendar days and not just counting weekdays M-F.

------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------