Modifier :timestamp
:timestamp does different things on different tags and fields:
- Unix timestamp on {date_created}, {date_updated}, {payment_date}, and {today}, under What to show in the picker.
Example:{date_created:timestamp}gives1768438800. - Convert to a Unix timestamp on Date and Time fields, under Change the output in the picker.
Example:{Start Date:128:timestamp}gives1773878400. On the test form, this field is{Start Date:128}(Date). - Unix timestamp on {now}, {yesterday}, and {tomorrow}, under What to show in the picker.
Example:{now:timestamp}gives1768449600.
Unix timestamp
A true UTC timestamp on {today}. On the entry's dates it is the site's local time shifted by its time-zone offset, so it is off by that offset on a site not set to UTC.
| Product | Gravity Forms |
|---|---|
| Requires | Gravity Forms 1.9 or later |
| In the picker | What to show, for {date_created}, {date_updated}, {payment_date}, and {today} |
Examples
Output from the real plugin code, run on a test entry.
| Merge tag | Output | Without the modifier |
|---|---|---|
{date_created:timestamp} | 1768438800 | January 15, 2026 |
{date_updated:timestamp} | 1768439400 | January 15, 2026 |
{payment_date:timestamp} | 1768439100 | January 15, 2026 |
{today:timestamp} | 1768467600 | January 15, 2026 |
{date_created:timestamp}Rendered against an entry nine days older, where the result differs. | 1768276800 | January 15, 2026 |
{date_updated:timestamp}Rendered against an entry nine days older, where the result differs. | 1768277400 | January 15, 2026 |
{payment_date:timestamp}Rendered against an entry nine days older, where the result differs. | 1768277100 | January 15, 2026 |
Works on
Merge tags: {date_created} · {date_updated} · {payment_date} · {today}.
Convert to a Unix timestamp
Converts the value with PHP's strtotime(). Outputs -1 for a date at or before the start of 1970, or one PHP cannot read.
Works in any merge tag while GravityView is active, including Gravity Forms notifications.
| Product | GravityView |
|---|---|
| Requires | GravityView 1.17 or later |
| In the picker | Change the output, for Date and Time fields |
How to use it
Give a date to a script as a number
The date as a count of seconds (Unix time): 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
Output from the real plugin code, run on a test entry.
| Merge tag | Output | Without the modifier |
|---|---|---|
{Birthday:13:timestamp} | 294019200 | 04/27/1979 |
Works on
Left out
| Field kinds | Why |
|---|---|
| Date, after a custom format | Locked there. "Custom date format" already reads the value as a date. A second date step would read its result instead of the field’s value and give a wrong date. Remove it first. |
Unix timestamp
On these tags, the timestamp is the site's local time shifted by its time-zone offset, not a true UTC timestamp (unlike {today:timestamp}).
Works in any merge tag while GravityView is active, including Gravity Forms notifications.
| Product | GravityView |
|---|---|
| Requires | GravityView 2.30 or later |
| In the picker | What to show, for {now}, {yesterday}, and {tomorrow} |
Examples
Output from the real plugin code, run on a test entry.
| Merge tag | Output | Without the modifier |
|---|---|---|
{now:timestamp} | 1768449600 | January 15, 2026 |
{yesterday:timestamp} | 1768363200 | January 14, 2026 |
{tomorrow:timestamp} | 1768536000 | January 16, 2026 |
Works on
Merge tags: {now} · {yesterday} · {tomorrow}.