Using date fields in Word
Users generally have one of two problems with dates in
documents, which can be summed up as follows:
-
I put the date at the top of my letter using Insert |
Date. Why doesn’t the date update to the current date when I later print
the letter?
-
I
don’t want the date on my letter to change every time I print a copy. How
can I make it stay the same?
There are various ways to get a date into a document.
Obviously, the most straightforward is to just type it in. If you have
AutoComplete enabled on the AutoText tab of Tools | AutoCorrect
Options (Word 2003 and earlier only), you'll even find that Word tries to
help you do this (though you may not always find this “help” very helpful; and
if you live outside the United States, you will never find it helpful,
because all language versions of Word use U.S. date format! Unfortunately, there
is no way of turning this feature off unless you turn AutoComplete off
completely). Ribbon versions of Word (Word 2007 and above) implement date
AutoComplete unpredictably, so it is best not to rely on it.
This articles discusses options for inserting dates beyond
just typing them in.
Insert | Date
The method that most users discover first is the Date and
Time command on the Insert menu, which opens the Date and Time
dialog. (In Word 2007 and above, access this dialog using Insert | Text | Date and Time.)
Figure 1. The Date and Time dialog
If you insert a date from the Date and Time dialog,
you have two options:
-
The default is to enter plain text. This is the same as
typing the date into the document yourself, just a little quicker if you’re
a poor typist or don’t know the date.
-
If you check the box for “Update automatically,” Word
will insert a { DATE } field, which will always reflect the current system
date. It may not be updated when you open a document, but if you have the
“Update fields” option checked it will be updated when you print. You will
find this option in the following location:
-
Word 2003 and earlier: Tools | Options | Print.
-
Word 2007: Office
Button | Word Options | Display: Update fields before printing.
-
Word 2010 and above: File | Options | Display: Update fields before printing.
You can lock the field by
selecting it and pressing Ctrl+F11 (unlock it with Ctrl+Shift+F11),
or you can unlink it (convert it to ordinary text) with Ctrl+Shift+F9,
but it’s easier just to insert the date as plain text in the first place if
that’s what you want.
Important Note: The keyboard shortcut for inserting a {
DATE } field is Alt+Shift+D; it always inserts a date in the format
you have chosen as the default in the Date and Time dialog. Set the
default by selecting a format and clicking Default…, then answering
Yes in the ensuing dialog.
Other Date Fields
In addition to the { DATE } field that can be inserted from
the Date and Time dialog, Word has several other date fields. You can
insert these in either of two ways:
Figure 2. The Field dialog
-
Create the fields “by hand” by pressing Ctrl+F9
to insert the field delimiters (which look like braces but cannot be entered
from the keyboard) and then type the text between them. Once you become
accustomed to the appearance of date fields (by examining the field codes of
those you insert from the Field dialog), you will be able to create
them from scratch, including the necessary switches.
CreateDate
Perhaps the most useful date field is the { CREATEDATE }
field, which permanently records the date a document was created. At first
glance this might not seem very different from plain text, but if you put this
field in a template, each document based on it will automatically have the date
it was created. Or, if you sometimes copy an old letter to form the basis for a
new one (in effect using it as a template), the same will apply.
SaveDate
Another useful field is the { SAVEDATE } field, which
records when the document was last saved. If your document contains information
that is frequently updated and you want it to carry a revision date, this is the
one to use.
Important Note: Whenever you print a document
containing fields, they will be updated. This action causes Word to regard
the document as having changed, so when you close it, even if you have just
opened it and printed it and not made any (to your mind) changes, you will
be asked if you want to save it. Just say no! Otherwise you'll have
invalidated the revision date.
PrintDate
The { PRINTDATE } field is another one with some usefulness.
Since it is updated only when the document is printed, you will be able to open
a document and tell from this date when it was last printed. In this case,
however, you must save the document after the field is updated (that is, after
printing).
Formatting Date Fields
All the above fields can be formatted as you choose.
-
In the Field dialog in Word 2002 and above, you
can select the desired format from the same list you saw in the Date and
Time dialog (see Figure 2).
-
In Word 2000 and earlier, select one of the Date and
Time fields and press the “Options...” button. You will see various
“switches” that can be added to the field to make it print anything from
“12/31/99” to
“Friday, December 31, 1999, 11:59:59 PM.”1
Although Word makes it relatively easy to format date fields
by choosing a variety of built-in switches, sometimes you’ll need to customize
your own. The following instructions are therefore offered to help you (all
these instructions and more can be found in Word’s Help file under “switches,
reference”).
Date instructions
Month (M)
The letter “M” must be uppercase to distinguish months from
minutes.
Picture
item |
Displays
the month as |
M |
A number without a leading 0 (zero) for
single-digit months. For example, July is
“7”. |
MM |
A number with a leading 0 (zero) for
single-digit months. For example, July is
“07”. |
MMM |
A three-letter abbreviation. For example, July
is “Jul”. |
MMMM |
The full name of the month. For example,
“July”. |
Day (d)
Displays the day of the month or the day of the week. The
letter “d” can be either uppercase or lowercase.
Picture
item |
Displays
the month as |
d |
A number without a leading 0 (zero) for
single-digit days. For example, the sixth day of the month is displayed
as “6”. |
dd |
A number with a leading 0 (zero) for
single-digit days. For example, the sixth day of the month is displayed
as “06”. |
ddd |
A three-letter abbreviation. For example,
Tuesday is displayed as
“Tue”. |
dddd |
The full name of the day of the week. For
example, “Tuesday”. |
Year (y)
Displays the year as two or four digits. The letter “y” can
be either uppercase or lowercase.
Picture
item |
Displays
the month as |
yy |
Two digits with a leading 0 (zero) for years 01
through 09. For example, 1995 is displayed as
“95”, and 2006 is displayed as
“06”. |
yyyy |
Four digits. |
Time instructions
Hours (h)
A lowercase “h” bases time on the 12-hour clock. An
uppercase “H” bases time on the 24-hour, or military, clock; for example, 5 P.M.
is displayed as “17”.
Picture
item |
Displays
the hour |
h or H |
Without a leading 0 (zero) for single-digit
hours. For example, the hour of 9 A.M. is displayed as
“9”. |
hh or HH |
With a leading 0 (zero) for single-digit hours.
For example, the hour of 9 A.M. is displayed as
“09”. |
Minutes (m)
The letter “m” must be lowercase to distinguish
minutes from months.
Picture
item |
Displays
minutes |
m |
Without a leading 0 (zero) for single-digit
minutes. For example,
{ TIME \@ "m" }
displays
“2”. |
mm |
With a leading 0 (zero) for single-digit
minutes. For example,
{ TIME \@ "mm" }
displays
“02”. |
Seconds (ss)
Although seconds can be added to any DATE or TIME field,
some fields ignore them. For example, the field
{ TIME \@ "M/d/yyyy h:mm:ss am/pm" }
will display seconds accurately, but most DATE fields will
always display
“00”
for the seconds.
AM/PM
Displays AM and PM in the format you have selected as the
Windows defaults.2
Note that the Help topic on this switch is incorrect.
Regardless of whether you insert “AM/PM”, “am/pm”, “A/P”, or “a/p”, the Windows
default format will be displayed (usually AM or PM). So the following fields
give identical results:
{ TIME \@ "h A/P" }
{ DATE \@ "h am/pm" } 3
Ordinal numbers in dates
Occasionally a user wants to format a date as, say, December
31st, 1999, or 31st December 1999. Although these formats are not regarded as
correct by most U.S. style manuals, they are prescribed (or at least accepted)
in some European countries, and are in very common use in the UK (reflecting
spoken English, in which dates are always pronounced with ordinals).
To achieve this in Word you will need a combination of
either two or three date fields. The reason you need more than one is that you
will need to add the \* Ordinal switch to just the day part of the field.
To achieve the two dates given above, you would need:
{ DATE \@ "MMMM" } { DATE \@ "d" \*
Ordinal }, { DATE \@ "yyyy" }
{ DATE \@ "d" \* Ordinal } { DATE \@ " MMMM yyyy" }
__________________
1. |
You'll actually have to do a little surgery to
achieve this one. You'll need to select both the "dddd, MMMM d, yyyy"
and the "h:mm:ss am/pm" options and add both to the field. If you then
press OK, you'll get an error message (“too many picture switches”). What you must therefore do (in the text
entry box on the Options tab of the Field dialog) is take
out the second \@ and the quotes on either side of it and put a comma
after "yyyy." This should give you the result illustrated. |
2. |
To change the AM and PM symbols for Windows,
change the settings in the Regional and Language Options dialog
in the Windows Control Panel: Click the Start button, point to
Settings, and then Control Panel. Double-click the
Regional and Language Options icon, and then click Customize
and select the Time tab. Enter the formats you want in the AM
symbol and PM symbol boxes. In Windows 10, go to Start | Settings |
Region and click Additional date, time, and regional settings,
which will open Control Panel | Clock and Region. Click Region,
then Additional settings... Select the Time tab and change
the AM/PM setting. In Windows 11, click Start | Settings and
then, in the “Find a setting” box, type “control panel” and click
on “Control Panel”; then, in the Control Panel, select Clock and
Region, and proceed as for Windows 10. |
3. |
Notice that it really makes no difference
whether you use the { DATE } or { TIME } field; the result will depend
on the numeric formatting
“picture” switch you add. |
This article copyright © 2001, 2009,
2011, 2014, 2018, 2023 by
Suzanne S. Barnhill. Originally
published at http://word.mvps.org.
|