Summary
The {today} merge tags can be used in field default value settings, notifications, confirmations, and with some add-ons to output the date and/or time the merge tag is processed.
Since
Support for the today merge tags was added in Gravity Forms 2.6.0.1.
Important
By default the values will be formatted for output using the timezone, date, and/or time formats from the WordPress General Settings screen.
For the examples below the timezone is set to Europe/London
, the date format is set to F j, Y
, and the time format is set to g:i a
.
Default Usage
Outputs the specified date.
Merge Tag | Output |
---|---|
{today} | March 15, 2022 |
Modifiers
:time
Adds at [time]
to the output.
Merge Tag | Output |
---|---|
{today:time} | March 15, 2022 at 8:18 am |
:format
Define a custom format for the output using the WordPress and PHP date/time formatting characters.
The format must be defined after :format
, with a colon, like this :format:m/d/Y
.
If you want to use a colon in your output, it must be escaped with a backslash, like this \:
.
Merge Tag | Output |
---|---|
{today:format:m/d/Y} | 03/15/2022 |
{today:format:Y-m-d} | 2022-03-15 |
{today:format:d/m/Y\ \a\t\ H\:i\:s} | 15/03/2022 at 08:18:11 |
:timestamp
Outputs the value as a Unix timestamp; the number of seconds since the Unix epoch on January 1st, 1970 at UTC.
Merge Tag | Output |
---|---|
{today:timestamp} | 1647332291 |
This modifier cannot be used with other modifiers.