In Webmecanik, date filters allow you to accurately target your contacts in an automated way. When configuring a filter based on a "Date" or "Date/Time" field, you have the choice between several types of values.
1. Available value types
To configure a date filter, you first need to understand the interface options:
Absolute: Allows you to set a fixed date in the calendar (e.g.,
2026-01-01).Relative: Allows you to select a standard duration based on a number of days, months, or years via the graphical interface.
Text Formulas (Dynamic): Allows you to enter text or mathematical modifiers to create smart filters that update every day.
⚠️ IMPORTANT: To use the text expressions and dynamic formulas listed below, you must strictly select the "Absolute" type in the interface, then enter the formula directly into the text field.
2. List of usable dynamic values
Standard time expressions
| Value to enter | Targeted period |
|---|---|
today | The current day |
tomorrow | The next day |
yesterday | The previous day |
this week | The current week (from Monday to Sunday) |
last week | The previous calendar week |
next week | The next calendar week |
this month | The current calendar month |
last month | The previous calendar month |
next month | The next calendar month |
this year | The current calendar year |
last year | The previous calendar year |
next year | The next calendar year |
Advanced expressions (Start / End of month)
first day of previous monthlast day of previous monthNote: You can also target a specific month, e.g.:
first day of January 2022
Using day modifiers (future and past)
To target a specific date in the future or past without using standard keywords, you can apply direct numerical increments. For example, to add one day (target tomorrow), enter +1 day (the simplified writing 1 day also works). Conversely, to go back in time, using negative values like -2 days is exactly equivalent to the text expression 2 days ago. This flexibility allows you to adjust your targeting windows very precisely.
Specific cases: Birthdays and Anniversaries
These values ignore the year of the date field to rely only on the day and month. Ideal for loyalty filters.
birthdayoranniversaryPossible modifiers:
birthday -7 daysoranniversary -7 days
3. Concrete application examples
To fully understand the behavior of the filters, here are simulations based on specific reference dates.
Case 1: Using numerical modifiers (Precise relative)
Consider that today is 2022-03-05:
Date identified [equals]
-1 week(or-7 days): Returns all Contacts identified exactly on2022-02-26.Date identified [less than]
-1 week: Returns all Contacts identified before2022-02-26.Date identified [equals]
-1 months: Returns all Contacts identified exactly on2022-02-05.Date identified [greater or equal]
-1 year: Returns all Contacts identified2021-03-05and after.Date identified [greater than]
-1 year: Returns all Contacts identified after2021-03-05.
Case 2: Using text expressions (Periods and specific dates)
Consider that today is 2022-03-05:
Date identified [equals]
last week: Returns all Contacts identified in the specified date range, for example2022-03-01to2022-03-07.Date identified [less than]
last week: Returns all Contacts identified before2022-02-22.Date identified [equals]
last month: Returns all Contacts identified in the specified date range, for example2022-02-01to2022-02-28.Date identified [greater or equal]
last year: Returns all Contacts identified2021-01-01and after.Date identified [greater than]
last year: Returns all Contacts identified after2021-12-31.Date identified [greater than]
first day of previous month: Returns all Contacts identified after2022-02-01.Date identified [greater than]
last day of previous month: Returns all Contacts identified after2022-02-28.
Case 3: Automating Anniversaries (Annual recurring)
The keyword birthday allows you to create automated campaigns that run every year on the same date, regardless of the contact's birth year.
Date field [equals]
birthday -1 day: This filter will target every year all contacts whose birthday is the next day. If today is March 5th, it will find contacts born on March 4th (03-04).Date field [equals]
anniversary -1 month: This filter will target every year all contacts whose anniversary is exactly one month away. If today is March 5th, it will find contacts whose target date is February 4th (02-04).
Comments
0 comments
Please sign in to leave a comment.