Special Format Strings

Applies to Infiniti v7.0 or later
 

Special Formats

 
The following are format strings available for use in the “Document Format” field of Answers. The first four formats (“+”, “-“, “+-“ and “+-+-“) are additionally available for use within the Format() function. All other format strings listed here are available only within the Document Format field.
 

Format String

Description

+
Displays all text in upper case.
 
-
Displays all text in lower case.
 
+-
Displays the first letter of text in upper case, with the rest in lower case.
 
+-+-
Capitalize each word, title case.
 
one
Displays the number as text rather than a figure, for example, 100 would display as ‘One Hundred’.
 
+one
Displays a number as uppercase text.
 
-one
Displays a number as lower case text.
 
+-one
Displays a numer in text that starts with a capital letter with the rest in lower case.
 
lpad
Pads the left of the value with a character to the specified length, for example, LPAD '0'5 would return 00001 for a value of 1.
 
rpad
Pads the right of the value with a character to the specified length, for example, RPAD 'A' 10 would return HelloAAAAA for a value of Hello.
 
Left n
Provides the first n amount of letters in a text string.
 
Right n
Provides the last n amount of letters in a text string.
 
-Left n
Provides the first n amount of letters in a text string in lower case.
 
-Right n
Provides the last n amount of letters in a text string in lower case.
 
+Left n
Provides the first n amount of letters in a text string in upper case.
 
+Right n
Provides the last n amount of letters in a text string in upper case.
 
Trim
Removes any leading or trailing spaces.
 
OADate
Format string for converting serial dates (OLE Automation or OA Dates) into actual dates.
 
For example:
e.g.OADate {‘f’}
Where ‘f’ is an optional inner format string for altering the format of the date produced by the OA date conversion.
 
e.g.2 OADate ‘dd MMM yyyy’
 
The OA date format is used when calculating an end date based on a start date and a number of days to add.
 
To add the number of days from [q2] user prompt to a date entered in user prompt [q1] use the below formula with an [OADate] format.
errormask(DateDiff(4, #30-dec-1899, [q1]), 0) + errormask([q2], 0)
 
Infiniti 8.5 introduces support for Special Formats: +, -, +- and +-+- , into the Format() Function, all other Special Formats are not supported in the Format() function.

Related Articles:

 

Keywords

dateformat adddate