top of page

57. Convert Number/Date Values to Text Values

Description

How to convert a numeric or date value into a text value.

Code

Number Examples:

"«NumberVar»"
"«NumberVar:nine»"
"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:

"«DateVar»"
"«DateVar:6/3/1990»"
"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 convert date or number variables into text values is to place them in chevrons within a 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