Documentation

gwp_current_timestamp

Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

{gwp_current_timestamp}

Frequently Asked Questions

How can I display or store the current timestamp using gwp_current_timestamp?

You can use the {gwp_current_timestamp} merge tag to return the current time as a number of seconds since the Unix Epoch (January 1, 1970, 00:00:00 UTC). This is useful if you want to display the timestamp at the time of submission, or store it automatically in a field. Based on our tests, this merge tag works perfectly in both confirmation messages and as a default value in form fields.

Example:
Current Timestamp: {gwp_current_timestamp}

To store it in a field, use a Hidden field with this default value:
{gwp_current_timestamp}

What does the timestamp number actually mean?

The timestamp is a simple number representing the exact number of seconds that have passed since January 1, 1970, at 00:00:00 UTC. It does not display a human-readable date or time directly, but you can easily convert it later if needed.

Example:
1717754728

When is the timestamp generated?

The timestamp is generated at the exact moment the merge tag is processed. For confirmations and notifications, this will reflect the submission time. When used in a Hidden field, the timestamp is stored with the entry at the moment the form is submitted.

Example:
{gwp_current_timestamp}

Can I display the timestamp in both the confirmation message and the entry details?

Yes. You can display {gwp_current_timestamp} in confirmation messages and notifications, and store it in a Hidden field for reporting or later reference.

Example (confirmation message):
Current Timestamp: {gwp_current_timestamp}

Example (Hidden field default value):
{gwp_current_timestamp}

Why is the timestamp not formatted as a regular date and time?

The merge tag is designed to output the raw timestamp for flexibility. This format is ideal for storing time data consistently and is easy to convert to any human-readable format using external tools or code.

Example:
{gwp_current_timestamp}

Last updated: 18-07-2025

Advanced Merge Tagsv1.9.3

To use the functionalities described in this documentation, you'll need to get the GravityWP - Advanced Merge Tags add-on.

Read more