Skip to main content

Creating an IF that checks if current date is greater/less than date field

  • Oct 19, 2017 6:06 PM UTC
  • 2 replies
  • 55 views

I’m trying to create a formula field with an IF conditional that checks if the current date is greater/less than 365 days from a date that’s specified on a field date I have.

For example, I have an “Order” field that’s set as a date field.
I want to check to see if the “Order” field is greater than or less 365 days from the current date. If the date is greater, I want it to output “Long”. If shorter, I want it to output "Short.)

Any help would be greatly appreciated!

This topic has been closed for replies.

2 replies

Tuur
Forum|alt.badge.img+20
  • Inspiring
  • Oct 19, 2017 7:16 PM UTC

Hi there! Try this…

IF(DATETIME_DIFF(TODAY(), Order, 'days') > 365, 'LONG', 'SHORT')

  • Author
  • New Participant
  • Oct 19, 2017 7:40 PM UTC

@Tuur Beautiful. Thanks much!