Learn How HotDocs Processes Date Variable Format Examples

From HotDocs Wiki

Jump to: navigation, search

If a format example is specified for a date variable, HotDocs processes the format example by breaking it down into separate chunks of information. It then attempts to determine what each of these chunks represents, whether it is a month, a day, or a year. HotDocs uses a similar process to understand dates entered by end users. Once the date entered by a user and the date format specified by the template developer are both understood, HotDocs knows how to format the date for insertion into the assembled document.

HotDocs allows you to create new format examples if the existing ones do not meet your needs. You can set up examples such as July 4, 1945, or 07/04/45 and HotDocs will process the information in the same ways. For example, if you use January 12, 1995 as a format example, HotDocs recognizes the word January as a month and, by process of elimination, it determines that 12 represents the day and 1995 represents the year.

Sometimes a format example is specified as numbers separated by slashes, dashes, or spaces. To process these examples, HotDocs refers to the date detection setting, which specifies the order HotDocs processes format examples. In U.S. versions of HotDocs, the default setting is Month Day Year. In U.K. versions of HotDocs, the default is Day Month Year.

To illustrate, if you have 06/03/90 as a format example, and the date detection is Month Day Year, HotDocs looks at the first chunk (06) to see if it meets the requirements for representing a month. Since 06 is a number 12 or less, it does. HotDocs then moves to the next chunk of numbers (03) and determines that 03 meets the requirements for representing a day (it is 31 or less). HotDocs then checks the third chunk (90) and determines it represents a year.

Sometimes you need to insert a date in reverse order. For example, you want May 10, 2000 to be inserted as 10 May 2000 or 10/5/00. You may try to use the format 03/06/90. However, with a date detection setting of month-day-year, HotDocs still sees 03 as representing the month, 06 as representing the day, and 90 as representing the year. You can avoid this problem by changing the default date detection setting.


PLEASE NOTE:

You can also solve this problem using Computation variables. See Insert a Date in Reverse Order for more information.

To change your default date order

  1. At the HotDocs library, click the Options.gifOptions button. The HotDocs Options dialog box appears.
  2. Click the Interviews and Dialogs folder. The window changes to show several options relating to the way variables and dialogs appear and are processed during the interview.
  3. In the Answer Entry group, click the Date Detection drop-down list and select the Month Day Year or Day Month Year format.


PLEASE NOTE:

You can also click Options at the Tools menu.