codeRule conditions: Dates

Current date rules

The field current date (internal) is a field that is always available in Channable and that you can use to compare the current date to a specified date or time. You might use the current date rules for setting up sale prices whenever your webshop is holding a sale.

Current date - Is equal to

If there is only one specific moment that you want a rule to be used, you can compare the current date against certain values. This can be an exact date, but also selected months of the year, days of the week, days of the month, and times of the day.

Current date - Is on or After & Before

If there is not just a specific moment that a rule should be applied, but if there are start- and end values to the rule, the before and after options can be used. The if-part of the rule can filter items based on an exact date or time of the day.

Imported date rules

If you import a date field you compare the date in that field to a specified date or time. You might use the imported date rules below when you import different dates for different items so that you can dynamically set up date rules. For example, if your webshop is holding two different sales at two different times, you can set up one rule to fill in the sale price of your items.

Imported date - Is equal to date

Just like the internal current date field, imported date fields can be compared to certain values if you only want the rule to be used during a specific moment. These values can also be exact dates, months of the year, days of the week, days of the month, and times of the day.

Imported date - Is equal to relative moments

In addition to the specific moments that can be used in the rules for the current date field, imported date fields can also be compared to relative moments in time. This can be tomorrow, yesterday or a certain amount of days in the future or in the past.

Imported date - Before & after date

Imported date rules can also be used when you don't want to filter on one specific moment but want to work with a start- and/or end date for the rule. All the options from the before- and after menu for the internal current date field are available for the imported date fields.

Imported date - Before & after relative

The before- and after statements for imported date fields can also be used with relative values.

Last updated

Was this helpful?