HELP WITH AN IF FUNCTION

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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! 
Photo of Amanda Torrisi

Amanda Torrisi

  • 144 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

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.

(Edited)
Photo of Amanda Torrisi

Amanda Torrisi

  • 144 Points 100 badge 2x thumb
Perfect! Thank you!