Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

HELP WITH AN IF FUNCTION

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 Replies

  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    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.