Note: The Office 97 Service Patch 2 is currently not available for English Word 97 for Alpha.
How the product handles dates:
Storage. Date and time values for date usage in Microsoft Word are stored either as simple text strings or as a 32-bit integer. This convention means that the date is represented by a 4-digit year, eliminating the risk of date errors. If the date information is stored in a 32-bit integer, the data is represented by bit fields that have the following ranges:
Hours: 0-23
Minutes: 0-59
Seconds: 0-59
Weekday: 0(Sun)-6(Sat)
Day of Month: 1-31
Year: 1900-2411
Unless otherwise noted, features within Microsoft Word that manipulate dates store the dates as a 32-bit integer. What this means is dates saved with versions of documents retain their 4-digit year designations, regardless of display. Similarly, revision marking date information retains the 4-digit year designations.
String date parsing. Other date values, such as might be imported from another program or entered with an Insert Date/Time command, are simple text. Therefore, they are not handled as date values.
The one exception is with the Table/Sort command. In this command, text strings can be interpreted as date values. Two-digit years from 00 to 29 are assumed to be in the years 2000û2029. To change this behavior, users should correct 2-digit years to 4-digit years. There is no validation of the dates in Table/Sort. For example, a date of 2/30/2000 would be sorted before 3/1/2000. Table/Sort interprets the range of years 1900û2035.
A date window of 1930-2029 is used for interpretation of 2-digit year dates when using Date formatting (picture switch) of Quote Fields.
Saving to an earlier version of Microsoft Word, or upgrading, will not have an affect on dates within a document. Date field information and file properties will be retained and recognized.
Two-digit shortcut handling:
Conversion of 2-digit shortcut dates (primarily in table sort and in Microsoft Word fields) assumes a date window of 1930 through 2029.
Common date usage errors:
In general, the entry, importing or formatting of years as 2 digits should be discouraged or eliminated where date calculation dependencies in the user solutions exist. Since most document content, including data entered through Insert Date/Time and Text Form Fields, is stored as plain text, the century information could be improperly derived or assumed by the user solution. Use of Microsoft Word date field types and pre-defined document and file properties for document-related date calculations will ensure that the available information represents a true date.
Because Word date fields do not support date arithmetic, Microsoft has, in earlier documentation, suggested the use of nested formula fields (expressions) to accomplish adding or subtracting days, months, or years to dates. Because simple arithmetic calculations are not calendar-aware, this method is prone to Year 2000-type errors, particularly with 2-digit year values, and is no longer recommended.
Testing guidelines and recommendations:
In general, avoid testing in a production environment because we cannot predict side effects with other products. Interoperability testing with other Microsoft Office products can be conducted safely.
The following areas should be looked at to verify dates are being properly used. The table below can be used to guide testing of Microsoft Word within your organization.
Area
SubArea
Testing Notes
Edit
Insert Date/Time Table Sort AutoComplete
Insert Date and Time can insert the current date as text formatted as a date, or as a date field that can be updated. Table Sort can interpret text strings as a date, and sort in chronological order, ascending or descending. Two digits can be interpreted as years. 00 through 29 are interpreted to be 2000 through 2029. Table Sort recognizes the years 1900 through 2035. AutoComplete has a trigger for the current date.
File
File Native RTF Text Conversions Graphics Filters Versions Document Properties Revision Marking
Date information is stored in the document for creation date, revision date, and the date the document was last printed. Dates are written to RTF in a four-digit format. Date information is stored with text that is marked for revisions. The date information appears in a ToolTip next to the revised text. When multiple versions of a document are saved, date information is saved with each version. This date information can be viewed in the Versions dialog.
Fields
Date/Time Fields; Formula Fields; Summary Information Fields; Text Form Fields; Field Picture Switches
Many fields exist that manipulate date and time information. CreateDate, Date, DocProperty whose properties include CreateTime, LastPrinted, LastSavedTime, and Total Editing Time, EditTime, Info whose types include CreateDate, EditTime, PrintDate, and SaveDate, PrintDate, SaveDate, and Time. In German, the fields DocProperty: Total Editing Time, EditTime and Info: Edit Time are not available. Quote fields and Text Form fields are text fields that can be formatted as dates using field picture switches. Formula fields are designed to calculate text or numbers.
Macros
VBA WordBasic
The Visual Basic for Applications methods and properties that manipulate date and time information are: Application.OnTime Conversion.CDate Conversion.CVDate DateTime DateTime.Calendar DateTime.Date DateTime.Date$ DateTime.DateAdd DateTime.DateDiff DateTime.DatePart DateTime.DateSerial DateTime.DateValue DateTime.Day DateTime.Hour DateTime.Minute DateTime.Month DateTime.Now DateTime.Second DateTime.Time DateTime.Time$ DateTime.Timer DateTime.TimeSerial DateTime.TimeValue DateTime.WeekDay DateTime.Year FileSystem.FileDateTime Information.IsDate LetterContent.DateFormat Mailer.SendDateTime Range.InsertDateTime Revision.Date Selection.InsertDateTime VbVarType.vbDate Version.Date WdBuiltInProperty.wdPropertyTimeCreated WdBuiltInProperty.wdPropertyTimeLastPrinted WdBuiltInProperty.wdPropertyTimeLastSaved WdBuiltInStyle.wdStyleDate WdFieldType.wdFieldCreateDate WdFieldType.wdFieldDate WdFieldType.wdFieldEditTime WdFieldType.wdFieldPrintDate WdFieldType.wdFieldSaveDate WdFieldType.wdFieldTime WdSortFieldType.wdSortFieldDate WdTextFormFieldType.wdCurrentDateText WdTextFormFieldType.wdCurrentTimeText WdTextFormFieldType.wdDateText WdWordDialog.wdDialogInsertDateTime The WordBasic commands that manipulate date and time information are: AppInfo$(21-26) Date$() DateSerial() DateValue() Day() Days360() DocumentStatistics .Created, .LastSaved, .Printed, .Time GetDocumentProperty$ CreateTime, LastSavedTime, LastPrinted Hour() InsertDateField InsertDateTime InsertTimeField Minute() Month() Now() OnTime Second() Time$() TimeSerial() TimeValue() Today() ToolsRevisionDate() ToolsRevisionDate$() Weekday() Year()
Mail
Doc Routing Mail Merge Outlook Journal Posting SendMail WordMail
Mail messages can be sent from within Word. Date and Time functionality that is available with Word is also available within WordMail.
Internal
Boot/Quit DDE Environment OLE
No applicable notes.
Print
Document Property
The last date that the document was printed is saved with the document.
Templates
Templates
In templates, a combination of two-digit and four-digit years are inserted, and can be modified if necessary.
View
Header/Footer Footnotes/Endnotes Comments Status Bar
The CreateDate, Date, and PrintDate fields can be inserted into a document's header or footer via the Header and Footer toolbar. These fields are identical to the fields inserted via the Field dialog. The current date is displayed on the word status bar on NT 3.51.
Wizards
Calendar Wizard Letter Wizard Fax Wizard