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.relative.php. |
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
{gwp_date_created modify="+1 day" format="d-m-Y H:i:s"}
When the entry is created on 2021-03-30 12:21:23 this returns ’31-03-2021 12:21:23′
{gwp_date_created modify="-1 day" format="d-m-Y"}
When the entry is created on 2021-03-30 12:21:23 this returns ’29-03-2021′
Last updated: 20-01-2022