There are various use cases where it is necessary to limit a profile selection in terms of time. Common examples here are the time control of event mailings that are to be sent repetitively on a daily, monthly automated basis, or for evaluation purposes and profile considerations in a defined period.
The basis is the configuration of a target group, which takes into account the corresponding time factors.
Configuring time references in target groups
To configure a time reference within a target group, individually created pool fields with data type date or date with time as well as the following standard pool fields can be added as target group statements:
- Entry/change/discontinuation date
- eMailing last received
- Milestone last reached
For the configuration of these fields with the data type date or date with time, an absolute time specification in the form of time and date can be specified via the drop-down menus. Alternatively, relative time specifications are also possible in the text field below, such as last year or +1 day.
In the field for relative time entries like e.g. last year or +1 day can be entered.
Please note that relative time entries can only be made in English.
Possible entries (selection):
- now (returns the current date including time e.g.: 01.01.2020 09:31:13)
- today (returns the current date without time e.g.: 01.01.2020 00:00:00)
- yesterday, tomorrow
- 10 September 2022 (Please use only four-digit years)
- +1 minute, -1 minute
- +1 hour, -1 hour
- +1 day, -1 day
- +1 week, -1 week
- +1 month, -1 month
- +1 year, -1 year
- +1 week 1 day 4 hours 2 seconds, -1 week 1 day 4 hours 2 seconds
- next Monday midnight, last Monday midnight (i.e. next/last Monday 00:00)
- next month, last month
- next year, last year
Further examples and explanations can be found here: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative
Notice!
All text entries are used to determine a point in time.
The input "february 2022" determines the first time of February in the year 2022 thus 01.02.2022 00:00 o'clock UTC.
The properties of the configuration can be influenced by a further operator as to how the specified time is to be taken into account. There are depending on the selected pool as well as data field possibilities given like
- is smaller or equal
- is greater or equal
- is greater or less
- is equal or unequal
- is same day / month as
- etc.
"Smaller" can be interpreted as "earlier" and "larger" as "later" in the time context.
To narrow down time periods, target group statements for the data field must be combined in most cases. Here, it is possible to work concretely with absolute time specifications or also relative entries. In the case of relative entries, explicit care must be taken to ensure that the entries used accurately represent the desired time periods.
A concrete date, in the example 04.07.2022, is configured with the dropdowns of the absolute time specification. With this setting all profiles with this value are selected, here the 4.7.2022.
In this example, 04.07.2022 is configured with a relative time.
More examples can be found below.
Control of the delimited time periods
Notice:
Before using absolute or especially relative time specifications for a newsletter dispatch, please test the result of the target group configuration exactly for plausibility.
Procedure:
- After configuration and saving the desired time periods of the target group, switch back to the Configuration tab again.
- Click on "Edit" and the configuration will be displayed again.
- The fields of the absolute time entries now contain the concrete times that were configured by the relative entries.
- Check these entries carefully to see if the desired result is present. Especially a look at the time is worthwhile, whether e.g. the whole period of a day from 00:00h is included here, or "only" a time in the middle of the day. The addition of the relative specification "midnight" usually provides a remedy here.
- If the desired time configuration is correct, you can leave the editing with "Save" or "Cancel".
- If the configuration is still not correct, adjust it. Please check again according to the same scheme if the configuration is correct in time until the desired result.
Further examples:
Selection of all profiles with field value in the next month. In November 2022 these are all profiles from 01.12.2022 00:00 to 31.12.2022 23:59, because smaller 01.01.2023 00:00 is configured.
All profiles with value in the third-next calendar month.
All profiles with value in the past full calendar month.
All profiles with value in the 2nd quarter of the current year.
All profiles with value between the present time exactly one month ago and less of the present time, both time exactly. So all profiles can be collected, which have a value in the last 28, 30 or 31 days, depending on the length of the current month
All profiles with value in the next calendar year.
All profiles with value corresponding to the current day.
All profiles with field value 14 days in the future.
All profiles with value corresponding to the same day without considering the year e.g. 04.07.
All profiles with value corresponding to a concrete day e.g. exactly 04.07.2022.
All profiles with field value corresponding to tomorrow.
Application example
Birthday mailing: https://help.evalanche.cloud/hc/en-us/articles/360032774772-Birthday-emails
https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative