format-date

The format-date operation writes a date a different way. The date itself does not change, only how it is written.

Use it when the advertiser wants a format your data does not use.

How it works

You give it a format pattern and it rewrites the value to match.

Value: 2024-02-21              Pattern: d.m.Y          Result: 21.02.2024
Value: 2024-02-21 15:30:00     Pattern: Y-m-d H:i      Result: 2024-02-21 15:30
Value: 2024-02-21 15:30:00     Pattern: Y-m-d          Result: 2024-02-21

That last one is how you drop the time from a date that carries it.

Patterns worth knowing

  • Y-m-d gives 2024-02-21, the international format
  • d.m.Y gives 21.02.2024, common across Europe
  • m/d/Y gives 02/21/2024, the American one
  • Y-m-d H:i:s gives 2024-02-21 15:30:00, a full timestamp
  • l, j F Y gives Wednesday, 21 February 2024, written out

The letters are case sensitive. Y is a four-digit year and y is two, m is a zero-padded month and n is not.

An unreadable date stops the flow

If the value cannot be read as a date, the node fails with an error and the branch stops there.

This is different from unix, which quietly hands back the original value. Here you find out, which is better, but it means an empty or malformed date field takes the run down with it.

So put a condition on the step. Running it only when the field is not empty avoids the most common cause by itself.

Starting from a timestamp

A Unix timestamp is a number, not a date, and reading it as one gives nothing useful. Put an @ in front of it first, so 1735084800 becomes @1735084800, which is understood as a timestamp. Use prefix for that, then format-date.

The @ belongs in front of the value, not in front of the pattern.

Time zones

format-date rewrites the text and nothing else. It does not shift the date into another time zone, so a date recorded in UTC stays UTC no matter how you write it.

If the advertiser needs a different zone, that is a separate problem and format-date will not solve it.

Working with the other date operations

  • modify-date shifts a date forwards or backwards
  • unix turns it into a timestamp
  • format-date writes it a different way

Shift first, format last. A step that adds thirty days followed by a step that formats the result is the usual way to send an expiry date.

Reference

Patterns follow PHP’s date formatting. See PHP: DateTime::format for the full list of letters.

Insights that
helps you grow

  • Release notes 2026/08/14
    This was a big one. We went through roughly 200 pages of our knowledge base and rewrote the whole thing. Clearer structure, consistent terminology, and…
  • Release notes 2026/07/31
    What’s new in PalDock? A lot of this month went into things you won’t see directly – query optimisation, indexing, and general tuning under the…
  • Free Affiliate tracking software
    Many companies (inlcuding YOU) search for free affiliate tracking software because they want to launch an affiliate program without committing to expensive monthly fees. The…