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.
    • Related Articles

    • Using Code Blocks to Insert Custom HTML

      Code blocks allow you to insert custom HTML code into your email designs, giving you greater flexibility for custom content, real-time personalization, and third-party integrations. This feature is ideal for marketers who need more control over ...
    • Text editor

      Our email designer includes a simple text editor that you can use to further format text. This article includes how-to and FAQ regarding the text editor. What fonts are available? The font selections available in the editor are the universally ...
    • How do I merge a personalized image into my email for each recipient?

      How to Merge Personalized Images into Email Campaigns In some cases, you may want to personalize the image displayed in an email based on each recipient's data—such as a custom graphic, profile photo, or offer image. Delivra offers several ways to do ...
    • How do I use a repeater group to merge order data where multiple records exist?

      You may have customers who need to receive emails that display multiple line items in an order. You can use the Repeater Group function to accomplish the insert of multiple rows of data in our drag-and-drop email designer. Once the Repeater Group is ...
    • How do I merge a Personalized URL (PURL) into my email?

      What is a PURL? A PURL is a unique URL designed to be associated with a specific individual or recipient. PURLs are typically used in email to enhance personalization, track unique recipient engagement and responses. Marketers use PURLs for many ...