Insert current date and time

Insert current date and time

Inserting the Current Date and Time into Email Content

Inserting the current date or time can be particularly useful for transactional emails or purchase confirmations, where showing the email receipt date is important. In this case, "current" refers to the date and time when the contact receives the email.

How to Insert a Timestamp

To add a live timestamp, place this code into a text block within the drag-and-drop editor:

%%clock format [clock seconds] -format {%B %d, %Y}%%

The part inside the curly braces ({%B %d, %Y}) controls how the date and time are displayed. You can adjust the formatting by changing the codes inside.

Common Formatting Options

Here are the most popular options you can use to modify how the date and time appear (Capital letters are underscored):

For Dates

  • %a – Abbreviated weekday (e.g., Thu)
  • %A – Full weekday name (e.g., Thursday)
  • %b – Abbreviated month (e.g., May)
  • %B – Full month name (e.g., May)
  • %h – Another format for abbreviated month (e.g., May)
  • %m – Numeric month (e.g., 05)
  • %d – Numeric day of the month (e.g., 24)
  • %D – Date in MM/DD/YYYY format (e.g., 05/24/2018)
  • %y – Two-digit year (e.g., 18)
  • %Y – Four-digit year (e.g., 2018)

For Timestamps

  • %H – Hour (24-hour format, e.g., 10)
  • %M – Minutes (e.g., 47)
  • %S – Seconds (e.g., 23)
  • %P – Lowercase am/pm
  • %p – Uppercase AM/PM

Fun Fact

  • %s – Shows the number of seconds since midnight, January 1, 1970 (known as the Unix Epoch).

Example Formats

Here are examples of different ways you can display the date and time:

Format CodeExample Output
%%clock format [clock seconds] -format {%B %d, %Y}%%May 24, 2018
%%clock format [clock seconds] -format {%b %d, %y}%%May 24, 18
%%clock format [clock seconds] -format {%D}%%05/24/2018
%%clock format [clock seconds] -format {%m/%d/%y}%%05/24/18
%%clock format [clock seconds] -format {%m/%d/%y %H:%M:%S}%%05/24/18 12:04:00

Important Notes

  • Leading zeros cannot be removed: Formats like 05/24/2018 will always include a leading zero for single-digit months and days (e.g., May is "05").
    • There is currently no formatting option available to produce "5/24/2018" without a leading zero.
  • Preview Carefully: Always test your email to ensure the timestamp appears as you intend.