In This Article:

    Relative Date Queries

    In This Article:

      Relative date conditions


      The relative date queries can be used to find all matching records that fall within a time period relative to the current date. Fields that can be queried include Date Created and Last Modified, as well as any custom date fields.

      The only standard Supporter fields you can query on are the Last Modified and Date Created. Last Modified will tell you the last time a supporter’s record was updated – through taking action, by opening or clicking an email, or any other activity within Salsa. The Date Created field reflects the date that the supporter joined your list (this date will never change).

      Where the relative date conditions are really helpful are with custom fields. When you create a custom field with the type “Date” or “Date and Time”, you will then see those options displayed in your drop-down list.

      This is most helpful for custom fields related to dates – think along the lines of membership expiration dates.

      Note: You can’t query for the last time a particular field was edited, or the last time a name showed up.


      Query conditions:

      After you select the field you’d like to query on, you’ll choose a secondary condition. These conditions all use the same basic construction: <Field being queried> + <After/Prior to/Since...> + X



      Let’s run through a few examples. For all of the uses below, assume we have 4 supporters who have different membership expiration dates:

      • Assume that now is August 30.
      • Russ expired on July 4.
      • Jess expires on August 31.
      • Dave expires on September 27.
      • Shannon expires on October 12.


      After ___ days from now

      X=1, we end up with the date August 31. That means anything that comes after August 31 will be returned in the results. In this case, that means Dave & Shannon are the only results returned, and Jess is excluded because her record falls ON August 31 (remember – it’s greater than, not greater than or equal to).

      X = 27 returns a date of September 26, and still gives us Dave (who’s expiration is the next day following) and Shannon.

      X = 28 returns a date of September 27, which means Dave is now excluded and Shannon is the only result returned.


      Prior to ___ days from now

      X = 1 = Anything before August 31 – this would return Jessica and Russ.

      X = 33 = Anything before October 2 – this would return Jessica, Russ, and Dave, but not Shannon.


      Since ___ days ago

      X = 1 = August 29 – this would return everyone except Russ.

      X = 60 = July 1 – this would return everyone, including Russ (who’s expiration is now three days after the variable date).


      After ___ months from now

      X = 1 = September 30 - this will only return Shannon, but not Dave (his membership has lapsed 3 days prior).

      X = 2 = October 30 - this will return no results, as we have no other membership due dates after October 12.


      Prior to ___ months from now

      X = 1 = September 30 - this will return everyone but Shannon (she misses out by 12 days).

      X = 2 = October 30 - this will return everyone, including Shannon.


      Since ___ months ago

      X = 1 = July 30 - this will return Shannon, Dave, and Jessica, but not Russ.

      X = 2 = June 30 - this will return all, including Russ.


      After ___ years from now

      Because of the scale here, any X is going to exclude all of our examples since they all fall in the same calendar year.


      Prior to ___ years from now

      Because of the scale here, any X is going to include all of our examples.


      Since ___ year ago

      Because of the scale here, any X is going to include all of our examples.


      Was this article helpful?
      0 out of 0 found this helpful
      Have more questions? Submit a request


      • I've just found the relative date query and it would be helpful to have some direction or a link that explains how the value is set.

        Comment actions Permalink
      • Hi Joe!

        You should jump into Salsa and give them a shot! You'll see the blank box where you would enter your X value. But I do realize we don't have a screenshot of that on here, so I've updated the documentation accordingly. Here is the same example I used: 


        Comment actions Permalink

      Please sign in to leave a comment.