top of page

08. Using Number/Date Values in a Text Computation

Description

How to include a numeric/date value in a text computation.

Code

Number Examples

"There are «NumberVar» children"
"There are «NumberVar:nine» children"
"There are «COUNTER» children"
SET TextVar TO "The number's 5th power is «POWER( NumberVar, 5 )»"


Date Examples

"The date was «DateVar»"
"Today is «TODAY»"
"Today is «TODAY:6/3/1990»"
"Yesterday was «TODAY - 1 DAYS»"
"The current year is «YEAR OF( TODAY )»"
SET TextVar TO "The date entered was «DateVar:6/3/1990»"

Explanation

The simplest way to use date or number variables in text strings is to place them in chevrons within the quoted string. This allows you to use them just like you would in a document. To insert chevrons, type two less-than or greater-than symbols: << >>. HotDocs will automatically convert them into chevrons.

bottom of page