Str()

Home   Back   Next  

Working with Formulas > Functions Used in Formulas > Conversion Functions > Str()

 

STR() can be used in two ways. The first way to use STR() is to input a number with an optionally specified precision. STR() returns a character string with the number rounded to the specified precision. IF no precision is specified, the function returns a number rounded to zero decimal places.

 

The second way to use STR() is to input a date as the parameter. STR() returns a character string in a YYYYMMDD format from the specified date expression. If a null date is specified, the function returns a string of eight zeros.

 

Function Format

 

STR(number [, precision]) 

STR(date)

 

 

Return Value

 

STR() returns a character string

 

 

Examples

 

STR(10.5) = "11"

 

STR(1.23456789, 2) = "1.23"

 

STR(5.555555, 2) = "5.56"

 

STR(DATE(2002, 12, 25)) = "20021225"

 

STR(DATE("11/05/2002")) = "20021105"