☰
Documentation

gwp_date_updated

The gwp_date_updated Merge Tag returns a modified date time relative to the date time when the entry was last updated in the desired format.

Options

Examples

{gwp_date_updated modify="first day of next month" format="d-m-Y"}

When the entry is updated on 2021-03-30 12:21:23 this returns ’01-04-2021′


{gwp_date_updated format="d/m/Y\ \a\t\ H:i:s"}

When the entry is updated on 2021-03-30 12:21:23 this returns ’30-03-2021 at 12:21:23′

Use a field value in modify

The modify option supports nested merge tags: write a merge tag with *| and |* instead of curly brackets to use a value from the entry.

{gwp_date_updated modify="+*|Number of days:3|* days" format="d-m-Y"}

gwp_date_updated needs an entry, so it works in notifications, confirmations, GravityView, Gravity Flow and other places that run after submission.

For more modify examples, see Relative Date Formats in Gravity Forms.

Frequently Asked Questions

How can I display when an entry was last updated?

You can use the {gwp_date_updated} merge tag to show when an entry was last updated. By default, it returns the date and time in Y-m-d H:i:s format. Example: {gwp_date_updated}

How do I change the format of the updated date?

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_updated format="d/m/Y H:i:s"}

Can I show a relative date (like +1 week from last update)?

Yes. Use the modify option to adjust the displayed date/time relative to when the entry was last updated. Example: {gwp_date_updated modify="+1 week" format="d-m-Y"}

How can I display the updated date in a different timezone?

You can apply the timezone option to display the updated date in your desired timezone. Example: {gwp_date_updated timezone="Europe/Amsterdam" format="d-m-Y H:i:s"}

What happens if I do not update the entry?

If an entry was never updated after submission, {gwp_date_updated} returns the original entry creation time.

Options Examples Use a field value in modify Frequently Asked Questions
Proudly powered by WordPress