Date Variable Overview

A date variable is a type of variable that represents an unknown date value. For example, if you want to ask a template user for a date of birth, you would create a date variable in your template to capture that specific item of data.

In this topic Hide

  1. Overview
  2. Common Tasks
  3. Workflow
  4. Date Variable Properties
  5. When to Use Date Variables
  6. Date Variables and Formats
  7. Common Reference Topics

Overview

In HotDocs, a date variable is a component that represents an unknown date in your template (i.e. a date value, such as a combination of a calendar day, month, or year—11 Feb 2001)

). You can create date variables using the HotDocs Field Editor or Component Studio and date variables are typically:

Like other components, date variables have properties that you can set to define how they perform in an interview and how HotDocs processes the date variable in an assembled document. In fact, date variables have a number of unique properties, which you can review below.

Common Tasks

Among others, date variables enable you to accomplish the following common tasks:

Workflow

When you create a template from an existing document, the existing document usually contains placeholders for dates that are unknown. To enable template users to provide the unknown date, you:

When creating a date variable, you can set properties that define how to gather an unknown date value from a template user, how HotDocs stores that date value as an answer, and how to format that answer when assembling a document. For example, you start by setting the name property for the date variable, which is used to identify the date variable throughout Author and in the answer file. You can set the Prompt property to provide instructive text (as opposed to the date variable name) to help a template user answer a question during the interview. You can set the Default format property to define the pattern that HotDocs uses to format the template user's answer in the assembled document (such as whether or not to use a month abbreviation). Lastly, you can then group related date (and other) variables into dialogs to improve the usability and flow of an interview.

Once you have created the date variable and set all of the properties you need, you can use the test feature to ensure the variable will behave as you desire when the document is assembled.

Date Variable Properties

Like all variables, date variables have properties you can use to edit how the date variable appears in an interview, how the date variable is processed during assembly, etc. However, date variables do not have any properties that are unique (all of the properties you can use for date variables are the same as other variable properties).

When to Use Date Variables

To better understand when to use a date variable (as opposed to the other types of variables), consider the following:

Date Variables and Formats

When working with date variables, there are times when you may want to control how a template user's answer to an interview question is displayed in an assembled document. For example, you may want dates selected from a date picker and recorded in the interview as 6/11/2001 to appear in the assembled document spelled out or arranged differently (e.g. Monday 11 June 2001 or Eleventh day of June, 2001). HotDocs enables you to make such modifications to answers based on date variables using date formats. To assist you in using date formats, HotDocs provides a set of commonly used date formats (such as formats that enable you to spell out the date completely, abbreviate months, set capitalization, and more) when you install Author.

You can either format a single instance of the placeholder field that references the variable, or you can format every placeholder field that references that variable throughout the template. You can also create your own custom format, should you need a format not included in the commonly used formats.

For more information on formats, you can read the Formats Overview and the Formatting an Answer document for more information.

 

Common Reference Topics

Among others, the following reference topics may relate to this conceptual area: