Knowledge Base

How to set the format of date and time placeholders

Problem:

You need to customize the display format of time and date used by time-related placeholders (such as {Current date/time} or {Future date / due date}) in CodeTwo software.

Solution:

CodeTwo software allows you to customize the placeholder date format in many ways. You may, for example set the program to display full name of the day or to include your time zone information.

In fact, the way how the format is defined is pretty easy to understand. Please find an example below:

Format definitionExemplary date and time
yyyy-MM-dd HH:mm UTCzzz2015-10-07 09:01 UTC+02:00

Every letter (e.g. d) or letters combination (e.g. dd) stands for a part of the date, which is then converted to a real date when your message goes through Exchange Online or Exchange Server.

The following list describes all parts of example shown above:

  • yyyy - the year as four-digit number, e.g. 2015
  • MM - the month as two-digit number, e.g. 10; please note it needs to be uppercase - otherwise the minute will be displayed
  • dd - the day as two-digit number, e.g. 07
  • HH - the hour, two-digit number, using 24-hour clock. If you need to use 12-hour clock, use the following: HH tt, which will produce e.g. 09AM
  • mm - the minute as two-digit number, e.g. 01; please note it needs to be lowercase - otherwise the month will be displayed
  • zzz - hours and minutes offset from UTC

Info

If you open the properties of a placeholder for the first time:

  • in CodeTwo Exchange Rules (Pro), the format will be displayed using your Windows locale's settings - those depend on the regional preferences of the machine which is running the Administration Panel;
  • in CodeTwo Email Signatures 365, a pre-defined format will be displayed by default.

After changing and saving your custom format, it will be displayed this way in all emails.

Placeholder date format property in CodeTwo Email Signatures 365.
Fig. 1. Placeholder date format property in CodeTwo Email Signatures 365.

Our software uses standard .NET Framework Date and Time format. For more information regarding advanced customizations, please consult the following website: https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx (scroll down for the table describing the format specifiers).

Was this information useful?