0

It is easy to understand < and > operators for absolute dates. For example, 1966 < 1979 and 2024 > 2023.

However, what does less than in the context of "ago" mean?

For example, if I have a filter that says

close date < 100 days ago, I would interpret that: really old dates such as from last year would say true (less than) e.g. if today is Oct. 24, 2024 and one had close date July 2, 2023, it would be true.

Similarly, a day yesterday would be false: close date < 100 days ago would evaluate false for today is Oct. 24,2024 and close date is Oct. 23, 2024

Are the above statements true?

See also: Similar question Though it doesn't really answer this question IMHO, nor does the link to documentation it provides.

1
  • Why is there a downvote? This exchange seems to have people who downvote a lot... Commented Oct 28 at 16:58

1 Answer 1

2

This is covered in the documentation. Look at the section on "Filter Query Results Using Date Literals".

The key parts are that:

  1. Date literals define date (and time) ranges.
  2. Using "=" checks to see if the field value is within the range.
  3. Using "<" checks to see if the field value is before the start of the range.
  4. Using ">" checks to see if the field value is after the end of the range.
  5. You can combine "=" with "<" or ">" using "<=" and ">=", based on the above range matching being merged together (e.g. "<=" means the field value is before the end of the range).

Given this, an expression like close date < 100 days ago actually means match a close date that is before 100 days ago, not after 100 days ago (do not read this as "less than 100 days ago").

If the close date is 28th October 2024, then 100 days before that is 20th July 2024. Your expression, with <, will therefore be true for any date before 20th July 2024 and false otherwise. If using =, the expression is true for a date between 20th July and 28th October. Etc.

3
  • can you give a concrete example with actual dates please Commented Oct 28 at 16:56
  • i.e. For "close date < 100 days ago" here in Oct 2024, would January 2024 be true for "close date < 100 days ago" and Oct. 27, 2024 (yesterday as I write) be false? Commented Oct 28 at 16:57
  • 1
    @JosephDoggie obvious examples added.
    – Phil W
    Commented Oct 28 at 17:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .