Custom Date and Time

   
The custom date and time provides additional flexibility over the Preformatted Date or Preformatted Time options, allowing creation of custom date and time formats. Many of these formats are based on what is defined in the Regional Settings of the Control Panel. When run, the month, day, etc. display in the language defined in the regional settings of Windows.
 

 

 
Modify Keys > Replacement Text > Date/Time > Custom Date/Time 

 


Format
Various date and time formats have been predefined. Select one of the formats from the drop-down list. Or enter a custom date or time format by using the date/time options detailed in the chart below. Formats may be created for just the date, the time, or both.
 


Date/Time
Use Current Date / Time
Uses the date and time from the system clock at the time the macro is run.
 
Specific Date / Time
Set the value to a specific date or time, either in the past or future.

 
Adjust Current Date/ Time
Adjust the date or time to Days, Months, Hours or Minutes into the future or past. The calculations are based on the computer system time and date. 
  

 

List of Format Options

Format

Description

c

Displays the date using the Short Date Format defined in the Control Panel - Regional Settings, followed by the time using the Long Time format defined in the Control Panel - Regional Settings. The time is not displayed if the fractional part of the Date Time value is zero.

d

Displays the day as a number without a leading zero (1-31).

dd

Displays the day as a number with a leading zero (01-31).

ddd

Displays the day as an abbreviation (Sun-Sat) using the Short Day Name format defined in the Control Panel - Regional Settings.

dddd

Displays the day as a full name (Sunday-Saturday) using the Long Day Name format defined in the Control Panel - Regional Settings.

ddddd

Displays the date using the Short Date format defined in the Control Panel - Regional Settings.

dddddd

Displays the date using the Long Date format defined in the Control Panel - Regional Settings.

m

Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm

Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm

Displays the month as an abbreviation (Jan-Dec) using the Short Month Names format defined in the Control Panel - Regional Settings.

mmmm

Displays the month as a full name (January-December) using the Long Month Names format defined in the Control Panel - Regional Settings.

yy

Displays the year as a two-digit number (00-99).

yyyy

Displays the year as a four-digit number (0000-9999).

h

Displays the hour without a leading zero (0-23).

hh

Displays the hour with a leading zero (00-23).

n

Displays the minute without a leading zero (0-59).

nn

Displays the minute with a leading zero (00-59).

s

Displays the second without a leading zero (0-59).

ss

Displays the second with a leading zero (00-59).

z

Displays the millisecond without a leading zero (0-999).

zzz

Displays the millisecond with a leading zero (000-999).

t

Displays the time using the Short Time format defined in the Control Panel - Regional Settings.

tt

Displays the time using the Long Time format defined in the Control Panel - Regional Settings.

am/pm

Uses the 12-hour clock for the preceding h or hh specifier and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p

Uses the 12-hour clock for the preceding h or hh specifier and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm

Uses the 12-hour clock for the preceding h or hh specifier, and displays AM symbol defined in the Control Panel - Regional Settings for any hour before noon, and the contents of the PM setting defined in the Control Panel - Regional Settings for any hour after noon.

/

Displays the date separator character defined in the Control Panel - Regional Settings.

:

Displays the time separator character defined in the Control Panel - Regional Settings.

'xx'/"xx"

Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.