gwp_date_created
The gwp_date_created Merge Tag returns a modified date time relative to the date time when the entry was created in the desired format.
Options
modify (optional) | For available date time modifications, see https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative. |
format (optional, default =’Y-m-d H:i:s’) | For an explanation of available format options, see https://www.php.net/manual/en/datetime.format.php. Regular character can be escaped using a backslash /. For example: ‘d/m/Y\ \a\t\ H:i:s’. |
timezone (optional, default is WordPress timezone setting) | For available timezones, see https://www.php.net/manual/en/timezones.php. For example: Europe/Amsterdam It is also possible to use an offset value: +0200 |
Examples
When the entry is created on 2021-03-30 12:21:23 this returns ’31-03-2021 12:21:23′
When the entry is created on 2021-03-30 12:21:23 this returns ’29-03-2021′
Frequently Asked Questions
You can use the {gwp_date_created} merge tag to show when an entry was created. By default, it returns the date and time in Y-m-d H:i:s format.
Example:{gwp_date_created}
You can customize the display format using the format option.
For example, to show the date in day/month/year hours:minutes:seconds format:
Example:{gwp_date_created format="d/m/Y H:i:s"}
Yes! The modify parameter supports a wide range of relative date and time phrases — not just simple day offsets. You can shift the displayed date using flexible terms like:
Specific days → “last monday”, “next friday”
Month-based → “first day of next month”, “last day of previous month”
Week-based → “this week”, “next week”
Advanced → “third wednesday of this month”
You can also combine these formats for very specific adjustments.
Example:{gwp_date_created modify="first day of next month" format="d-m-Y"}
{gwp_date_created modify="last monday" format="d-m-Y"}
{gwp_date_created modify="third wednesday of this month" format="d-m-Y"}
You can apply the timezone option to display the date in your desired timezone.
Example:{gwp_date_created timezone="Europe/Amsterdam" format="d-m-Y H:i:s"}
Yes! You can set {gwp_date_created} as the Default Value of any supported field (such as a Hidden field) to store the entry creation time in the database.
Example:
Default Value: {gwp_date_created}
You can view a full guide on supported formats, modify options, and usage examples in our documentation:
GravityWP Date Format & Modifiers Reference
Last updated: 18-07-2025