How do I insert a date?Why does it (not) change when I re-open the document?This page last revised: Friday, August 16, 2024. For Versions of Word 97-2019 (365). Downloadable Menu Add-On for Date fields 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). So, if you use the document on a future date, it will be different. 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). When used in a template, it will update in a new document based on the template, to the date the document is created. { PRINTDATE } - The date the document was last printed. { SAVEDATE } - The date the document was last saved. { TIME } - Essentially the same as the DATE field. When used without a "picture" it will give you the current time. With a "picture" it gives the same information as the DATE field.
Note that the braces {} for these, like all field codes, cannot simply be typed. If you want to type a field, you have to use Ctrl + F9 to insert the braces. You can type the field and switches, select what you typed and press Ctrl + F9 to make it a field, or you can insert the braces and then type between them. 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:"
example: { CREATEDATE \@ "MMM dd, yyyy" } = Aug 01, 2024 assuming that is the date the document is created 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. Examples of the former reason: { CREATEDATE \@ "dddd" }, the { CREATEDATE \@ "d" \*ordinal } day of { CREATEDATE \@ "MMMM" } in the year { CREATEDATE \@ "yyyy" } = Thursday, the 1st day of August in the year 2024. This { CREATEDATE \@ "d" \* ordtext \* caps } day of { CREATEDATE \@ "MMMM" }, { CREATEDATE \@ "yyyy" \* cardtext \* caps } = This First day of August, Two Thousand Twenty-Four 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 and Formatting fields with switches by Graham Mayor, MVP. 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, i.e. 1st or 3rd instead of 1st or 3rd. Here is a variation of one of Macropod's fields; go to the original document to copy this as a field. Remember that the braces { } cannot be simply typed. The paired braces shown are matched by color. {QUOTE{CREATEDATE \@ "dddd 'the' d"}{IF{=(MOD({={CREATEDATE \@ d}+89},100)>2)*(MOD({={CREATEDATE \@ d}+9},10)<3)}= 1 {=MOD({CREATEDATE \@ d},10)-2 \# rd;st; nd} th}{CREATEDATE \@ "' of' MMMM, yyyy"}}If you think this is complex, check out calculated dates! If you check the box to Automatically update in the Ribbon versions, you not only get a Date Field (usually not what you want) but also a Content Control. This adds complexity with no known benefit.
(Without "Automatically update" you get neither the field nor the Content Control, but why not just type the date?)
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:
You can download a macro-free Add-In that simply inserts a CreateDate field when you press Alt+Shift+D instead of a Date field. Once you have created a date field that is in the format you want to use, you can also select it and save it as a formatted AutoCorrect entry named something like "mydate." See Automated Boilerplate Using Microsoft Word. SAVEDATE and PRINTDATE not up-to-date.Note that these fields give the date and time that the document was last saved or printed. When you print a document, the PRINTDATE will likely reflect the date on which you are printing the document. Instead it will show when it was previously printed. If you save your document after printing and then update the field, it will show the date of that printing. Likewise, the SAVEDATE field will not change when you save a document until the field is later updated. So, if the SAVEDATE includes a time, it never will be correct. These fields will usually be updated by a Print Preview. Ordinal date in a Content Control?Greg Maxey wrote a procedure to give an ordinal date with superscripted abbreviations in a Content Control. You can find it here (post #7). See also Making a Date by Suzanne Barnhill, MVP. Freezing a DATE field in an existing documentIf you have a document with a Date field where what was desired was a plain text date or a CREATEDATE field, you can open the document in WordPad to see the original date. If opened in Word, it will automatically show the current date. See this thread on the Microsoft Answers site. Note that WordPad is scheduled for deletion from Windows 11 in fall 2024. See this article for more on that. |
Many people visit this site and use the information it
contains.
Copyright 2000-2024 Charles Kyle Kenyon
FAQ provided as an adjunct / hobby as a part of my web site as a
criminal defense lawyer.
|