Skip to main content

Modifier: :format

:format means different things depending on the merge tag or the kind of field:

Custom date format

On {date_created}, {date_updated}, {payment_date}, {today}.

A PHP date() format string. The format is the NEXT colon-separated token, not part of this one; escape any literal colon inside it as \:.

ProductGravity Forms
RequiresGravity Forms 1.9 or later
Works on{date_created}, {date_updated}, {payment_date}, {today}
In the pickerChange the output

Examples

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutputWithout the modifier
{date_created:format:Y-m-d}2026-01-15January 15, 2026
{date_updated:format:Y-m-d}2026-01-15January 15, 2026
{payment_date:format:Y-m-d}2026-01-15January 15, 2026
{today:format:Y-m-d}2026-01-15January 15, 2026
{date_created:format:Y-m-d}

Rendered against an entry nine days older, where the result differs.

2026-01-06January 15, 2026
{date_updated:format:Y-m-d}

Rendered against an entry nine days older, where the result differs.

2026-01-06January 15, 2026
{payment_date:format:Y-m-d}

Rendered against an entry nine days older, where the result differs.

2026-01-06January 15, 2026

Where the merge tag picker offers it

Merge tags: {date_created} · {date_updated} · {payment_date} · {today}.

Custom date format

On Date, Time fields.

A PHP date() format string, attached inline with a colon. Escape a literal colon inside the format as \:. Case matters: format:Y-m-d and format:y-m-d are different dates.

ProductGravityView
RequiresGravityView 2.26 or later
Works onDate, Time fields
In the pickerChange the output

How to use it

Write a date out in words

Uses PHP date format characters. Put a backslash before each comma in the format: a bare comma starts the next modifier, so the date would stop at the first one.

Write

Born on {Birthday:13:format:l\, F jS\, Y}

Get

Born on Friday, April 27th, 1979

Examples

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutputWithout the modifier
{Birthday:13:format:m\:d}04:2704/27/1979

Where the merge tag picker offers it

Form fields: Date · Time.

Custom date format

On {now}, {yesterday}, {tomorrow}.

A PHP date() format string. Attached with a colon and consumes the rest of the modifier string, so it must come last; escape a literal colon as \:.

ProductGravityView
RequiresGravityView 2.30 or later
Works on{now}, {yesterday}, {tomorrow}
In the pickerChange the output

Examples

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutputWithout the modifier
{now:format:Y-m-d}2026-01-15January 15, 2026
{yesterday:format:Y-m-d}2026-01-14January 14, 2026
{tomorrow:format:Y-m-d}2026-01-16January 16, 2026

Where the merge tag picker offers it

Merge tags: {now} · {yesterday} · {tomorrow}.