A date in a value comes from your product feed (a publish date, a sale end date) or from Today's date. Three steps
work on it: Format date writes it in the format you choose, Date difference counts the days between two dates (or
hours, weeks, months and so on), and Shift date moves it forward or back. Together they give you a "published 12 days
ago" line or a "sale ends in 3 days" countdown.
Add them with "+ Add step" in any value editor: a placeholder in Studio, a channel field, a prompt input, or a catalog
rule's Set field value. A Date difference or Shift date changes nothing until its settings are filled in, so the date
passes through as it is.
If you want a label such as "New" or "Last chance" rather than a date printed in the ad, compare the date in a rule
instead. See Rules that depend on dates.
Format date#
Format date turns a date into text, written the way its Output pattern says. The pattern is built from letters:
| Letters | Writes | Example |
|---|
yyyy | the year | 2026 |
MM | the month as two digits | 01 |
MMM | the short month name | Jan |
MMMM | the full month name | January |
dd | the day as two digits | 07 |
d | the day, no leading zero | 7 |
EEE | the short day name | Wed |
HH | the hour, 00–23 | 14 |
mm | the minutes | 05 |
ss | the seconds | 09 |
XXX | the time zone offset | +02:00 |
Dashes, dots, slashes, commas and spaces are written as they stand. Any letter is read as a date letter, so put words in
single quotes: 'T' writes a literal T. Some common patterns:
| Pattern | Writes |
|---|
yyyy-MM-dd | 2026-01-31 |
dd.MM.yyyy | 31.01.2026 |
dd/MM/yyyy | 31/01/2026 |
MM/dd/yyyy | 01/31/2026 |
d MMMM yyyy | 31 January 2026 |
d MMM | 31 Jan |
yyyy-MM-dd HH:mm | 2026-01-31 14:05 |
yyyy-MM-dd'T'HH:mm:ssXXX | 2026-01-31T14:05:09Z |
The Common formats menu at the end of the Output pattern field writes any of these for you, and the line under the
field shows what your pattern writes for a few sample dates.
Month and day names follow the catalog's language, so d MMMM writes "31 januari" for a Swedish catalog. A catalog with
no language set writes the short English names, so MMMM there gives "Jan".
Time zone decides which clock the date is written in. Same as input keeps the date's own time zone, and a date
that carries none is read as UTC. To convert, pick a region such as Europe/Stockholm, which follows its summer and
winter time. Abbreviations like CET and fixed offsets like +02:00 aren't accepted.
A date with no time of day, like 2026-08-06, never changes day, whichever time zone you pick.
What a date step can read#
In a catalog, the date steps read a column's text as a date when it is written as:
- an ISO date, with or without a time:
2026-08-06, 2026-08-06T14:30:00+02:00
- a compact date:
20260806
- a day, month and year in your catalog's usual order, without a time, such as
26.08.2026
- the pattern you gave the column, when its type is Date with a pattern on the
Mapping tab.
A value in any other form makes the step come out empty for that product, so the value's fallback is used. A text step
before the date step, even Trim, stops the column's pattern from applying: the date step then reads that text as one
of the other forms above.
In a Studio template, a channel or a prompt, a date from the product's own fields, such as a sale start or end date or
Today's date, is read as it is. Text has to be an ISO date, with or without a time.
A column that holds several dates#
If a column holds several dates for a product, a date step works on each one and the value stays a list. A value the step
can't read is dropped and the rest are kept. The fallback is used only when none could be read. Where only one value fits,
such as a field that holds one value or the value a condition compares, the first is used. See
Steps: changing a value before it is used.
Date difference#
Date difference counts from this date to the Other date, which is Today's date or another field such as a sale
start date, in the Unit you pick: minutes, hours, days, weeks, months or years. The count is always a whole number of
units, and it's negative when the other date is earlier.
Days, weeks, months and years count calendar dates. A product published on 6 August is 0 days old all of 6 August, 59 days
old all of 4 October, and 60 days old from midnight on 5 October. So "less than 60 days" is true for 60 calendar days,
including the day it was published. Time zone decides where each day starts, as for Format date.
Hours and minutes are elapsed time, so Time zone has no effect on them, and a date-time without an offset is read as UTC.
If your feed's dates carry a time zone offset and you count days across a summer/winter time change, or against Today's
date, pick your region under Time zone so both dates are counted as days in that region.
The result is a number. To calculate with it or write it nicely, add a Math or Format number step after it.
Shift date#
Shift date moves the date by an Amount of the Unit you pick. In the Amount box, type a whole number,
negative to move back (such as -7), or pick a field from your feed. The box tells you if it can't use what you typed: see
Typing a number. The result keeps the date's own time zone.
At the end of a month, adding months lands on the last day of a shorter month: 31 January plus 1 month is 28 February (29
in a leap year). Date difference doesn't mirror this: it counts 31 January to 28 February as 0 months, because a month
counts only once the same day of the month is reached.
A shifted date is still a date, so you can add Format date after it to write it out.
Today's date#
Studio templates, channel fields and prompts can use Today's date. Catalogs can't: see
Rules that depend on dates for why, and what to use instead.
A value calculated from Today's date is worked out when it is used, and nothing recalculates it at midnight:
- In a channel field, it is calculated each time the channel runs: after an import that changes any of its products, a
publish, a template publish or Regenerate. Between runs it keeps the value from the last run.
- In a Studio design, a value that changes every day means each product's design is rendered again, and uses
Credits, whenever it is next rendered on a new day. To show a label rather than a running
count, compare the date in an automation (for example "on or after 60 days ago") or in the catalog's
Rules.
- In a prompt, it is calculated when the prompt next writes content for the product: after a feed change, a prompt
publish or an edit. It keeps that value until then, and the changed input means new content is generated, which uses
Credits.
When Renable won't publish#
When a date step can't work, Publish stops and names the step, and the step shows the problem in red in the value
editor. What each problem means, and the fix:
- An amount that isn't a whole number on a Shift date: enter a whole number such as 7 or -7, or choose a field.
- An output pattern that can't be used on a Format date: use date letters such as yyyy, MM and dd, for example
yyyy-MM-dd.
- A time zone that isn't recognised: choose UTC or a region such as Europe/Stockholm.
- A Format date step before a Date difference or Shift date: Format date turns the date into text, so the step after
it has no date to work with. Move the Format date step after it.
- A Format date step on the other date of a Date difference: leave it out, and format the result after the step.
- A Format number step on a field used in a calculation: the amount of a Shift date, or a field in a Math step,
must stay a number. Remove its Format number step and format the result after the calculation.
- A Math or Format number step directly after a Shift date: Shift date gives a date, and both need a number. Put them
before the Shift date step, or use Date difference to count the days and Format date to write the date.