Forum Discussion

Re: Setting a Field value based on a Date/Time Field

If you post your code we can look, but something like this.

If(
 isnull([Date2] and today()<[Date1], "Pending",
[Date2] <= [Date1] + minutes(30) or [Date2]>= [Date1] + minutes(30), "On Time",
[Date2] > [Date 1] + minutes(30) or [Date2] < [Date 1] - minutes(30), "Late",
isnull([Date2]) and today()>[Date1], "No Show")

Untested....

------------------------------
Mike Tamoush
------------------------------

16 Replies

  • BrianDunk's avatar
    BrianDunk
    Qrew Cadet
    Hey Mike, I added actual field names and keep gettng a syntax error.  This is what my formula looks like to this point.
    As you can see the first line seems to have an issue and when I try to save I get the "Formula Syntax Error" pop up window.

    Any suggestions on how to fix?
    Thanks again,
    Brian

    ------------------------------
    Brian Dunk
    ------------------------------
    • BrianDunk's avatar
      BrianDunk
      Qrew Cadet
      If(isnull([Actual Arrival Date] and today() < [Appointment Date], "Pending",
      [Actual Arrival Date] <= [Appointment Date] + minutes(30) or [Actual Arrival Date]>= [Appointment Date] + minutes(30), "On Time",
      [Actual Arrival Date] > [Appointment Date] + minutes(30) or [Actual Arrival Date] < [Appointment Date] - minutes(30), "Late",
      isnull([Actual Arrival Date]) and today()>[Appointment Date], "No Show")

      ------------------------------
      Brian Dunk
      ------------------------------
      • MikeTamoush's avatar
        MikeTamoush
        Qrew Commander
        Sorry. Use Now() instead of Today() for date/time.

        If(isnull([Actual Arrival Date] and now() < [Appointment Date], "Pending",

        ------------------------------
        Mike Tamoush
        ------------------------------