Discussions

Expand all | Collapse all

HELP WITH AN IF FUNCTION

  • 1.  HELP WITH AN IF FUNCTION

    Posted 10-25-2017 14:56
    I have two fields.. [Last Service] and [Service Type]. I would like a formula check box that says:

    If [Service Type]=2 and [Last Service] is not during THIS YEAR, then check. 

    I cannot seem to get the date(this year) part of the formula to work! 
    Any ideas? 
    Thank you! 


  • 2.  RE: HELP WITH AN IF FUNCTION

    Posted 10-25-2017 15:26

    if(

    [Service type]=2 AND

    (year([Last Service])<year(Today()) ), true, false

    )

    This will look at the year part of the [last service] date field and compare that to the current year.

    The Today() function is dynamic and changes every day.

    The Today() function has open and closed parens. the two extra right parens close the Year() function and close off the comparison statement.

    Today() is also just a date function. Now() is a date/time function.



  • 3.  RE: HELP WITH AN IF FUNCTION

    Posted 10-25-2017 15:39
    Perfect! Thank you!