Skip to main content

Modifier: :timestamp

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

Unix timestamp

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

ProductGravity Forms
RequiresGravity Forms 1.9 or later
Works on{date_created}, {date_updated}, {payment_date}, {today}
In the pickerWhat to show

Examples

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

Merge tagOutputWithout the modifier
{date_created:timestamp}1768438800January 15, 2026
{date_updated:timestamp}1768439400January 15, 2026
{payment_date:timestamp}1768439100January 15, 2026
{today:timestamp}1768467600January 15, 2026
{date_created:timestamp}

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

1767672000January 15, 2026
{date_updated:timestamp}

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

1767672600January 15, 2026
{payment_date:timestamp}

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

1767672300January 15, 2026

Where the merge tag picker offers it

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

Convert to a Unix timestamp

On Date, Time fields.

Runs the value through strtotime(). Yields -1 when it is not a parseable date.

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

How to use it

Give a date to a script as a number

Seconds since January 1, 1970: easy to sort or compare in JavaScript.

Write

<time data-timestamp="{Birthday:13:timestamp}">{Birthday:13}</time>

Get

<time data-timestamp="294019200">04/27/1979</time>

Examples

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

Merge tagOutputWithout the modifier
{Birthday:13:timestamp}29401920004/27/1979

Where the merge tag picker offers it

Form fields: Date · Date, after a custom format · Time.

Unix timestamp

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

Also switches the relative-date tags to UTC rather than site-local time.

ProductGravityView
RequiresGravityView 2.30 or later
Works on{now}, {yesterday}, {tomorrow}
In the pickerWhat to show

Examples

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

Merge tagOutputWithout the modifier
{now:timestamp}1768449600January 15, 2026
{yesterday:timestamp}1768363200January 14, 2026
{tomorrow:timestamp}1768536000January 16, 2026

Where the merge tag picker offers it

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