How do I insert a date?
Why does it (not) change when I re-open the document?
This page last revised: 13 Jul 2006 07:21:32 -0500.
The easy (but probably wrong) way to put a date in your document is Insert --> Date and Time.
If you don't check "Update Automatically" it is the same as typing the date yourself (except harder). If you do check "Update Automatically" it will update when you print (if you have the setting under printer options as "Update Fields" which is the default). You can manually force an update by putting your insertion point in the date and pressing the [F9] key.
If you want to put a date in a template that updates to the current date when a document is created based on the template, or want to change the format or do other things with the date field, you want to use Insert --> Field --> Date and Time instead. Using the options here, you can either pick a format or type your own characters (called a picture) for the format. The options for the type of date include:
{ DATE } - The date you are looking at the document. Always today (although it may not show on screen as today until you update the field).
{ CREATEDATE } - The date the document was created (or saved using Save As).
{ PRINTDATE } - The date the document was last printed.
{ SAVEDATE } - The date the document was last saved.
The above are the field codes that will be inserted for you using Insert è Field è Date and Time without using any options. If you choose options, they can include the following "pictures:"
Picture | Displayed Date |
\@ "MMMM d, yyyy" | August 1, 2001 |
\@ "MMM dd, yyyy" | Aug 01, 2001 |
\@ "MM/dd/yy" | 08/01/01 |
\@ "dddd, MMMM d" | Tuesday, August 1 |
\@ "ddd, MMM. d, yyyy" | Tue., Aug. 1, 2001 |
\@ "MM/dd/yy hh:mm:ss am/pm" | 08/01/01 10:36:12 PM |
\@ "d" \* ordinal | 1st |
\@ "d" \* ordtext | first |
example: { CREATEDATE \@ "MMM dd, yyyy" } = Aug 01, 2001
If you don't like the pictures you are offered, pick the one that is closest to what you want and then modify it in the Insert Field dialog box (or in the codes themselves using Toggle Field Codes).
You can also break a date into multiple fields. This can be done to use special formatting or if you use the F11 key (next field) for manually editing. Example of the former reason:
{ CREATEDATE \@ "dddd" }, the { CREATEDATE \@ "d" \*ordinal } day of { CREATEDATE \@ "MMMM" } in the year { CREATEDATE \@ "yyyy" } = Tuesday, the 1st day of August in the year 2001.
Remember that fields in headers and footers don't get updated quite as predictably. They work fine with CREATEDATE but can have the same problem as page numbers (see that topic) with DATE. If you have the date anywhere in the body of your document, you are best served using a StyleRef field in the header or footer to pick it up rather than putting a field in the header/footer.
For more on "pictures" and formatting dates see: Fields Switches.
If you are trying to produce a special format for a date in an online formfield, take a look at How to Create Ordinal (Legal) Dates in Form Fields (KB)
See also Graham Mayor's extensive page on Formatting Microsoft Word Fields with Switches, especially the section on Date Fields With Ordinals. He (and Macropod) show how to do superscripted ordinals.
If you want a menu that gives you different kinds of date fields that can be inserted into documents, download the LegalToolbars from http://www.addbalance.com/word/download.htm. This is a self-documenting global template and includes the following fields in different formats on a menu that can be used without the rest of the legal toolbar:
Create Date (probably the one you will want to use in most forms) | |
Saved / Modified Date | |
Date Printed | |
Always today (changes whenever document is opened / printed) |