Edit|Insert Date & Time

Inserts the current date and time at the position of the text cursor. If you click this item directly or use its keyboard shortcut, the date and/or time are inserted using the format you last used. If you’ve never used this command before, it defaults to the short date and time formats set in Windows.

To use a different date and time format, or to insert the date only or the time only, select Other Date & Time format in the submenu of the Insert Date & Time menu item. A screen will pop up with a list of date and time specifiers. You can type in the date and/or time format that you want in the edit box at the top. You can double-click a specifier in the list to add it to the format. The “actual date and time” box shows a preview of the text that is inserted when you click OK.

The Insert Date & Time submenu keeps a history of the last 16 formats that you used. Click on one to insert the current date and/or time using that format.

Date and Time Format Specifiers

These are the date and time placeholders that you can use. Format specifiers may be written in uppercase as well as in lowercase letters. Both produce the same result.

SpecifierDescription
cDisplays the date in short format followed by the time in long format as specified in the regional settings in the Windows Control Panel.
dDisplays the day as a number without a leading zero (1-31).
ddDisplays the day as a number with a leading zero (01-31).
dddDisplays the day as an abbreviation (Sun-Sat) in the language of the current Windows locale.
ddddDisplays the day as a full name (Sunday-Saturday) in the language of the current Windows locale.
dddddDisplays the date using the short date format specified in the regional settings in the Windows Control Panel.
ddddddDisplays the date using the long date format specified in the regional settings in the Windows Control Panel.
mDisplays 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.
mmDisplays 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.
mmmDisplays the month as an abbreviation (Jan-Dec) in the language of the current Windows locale.
mmmmDisplays the month as a full name (January-December) in the language of the current Windows locale.
yyDisplays the year as a two-digit number (00-99).
yyyyDisplays the year as a four-digit number (0000-9999).
hDisplays the hour without a leading zero (0-23).
hhDisplays the hour with a leading zero (00-23).
nDisplays the minute without a leading zero (0-59).
nnDisplays the minute with a leading zero (00-59).
sDisplays the second without a leading zero (0-59).
ssDisplays the second with a leading zero (00-59).
zDisplays the millisecond without a leading zero (0-999).
zzzDisplays the millisecond with a leading zero (000-999).
tDisplays the time using the short time format specified in the regional settings in the Windows Control Panel.
ttDisplays the time using the long time format specified in the regional settings in the Windows Control Panel.
am/pmUses 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/pUses 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.
/Displays the date separator character specified in the regional settings in the Windows Control Panel.
:Displays the time separator character specified in the regional settings in the Windows Control Panel.
'xx'/"xx"Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.

See Also

Edit menu