This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 456.
ToText(456, "###")
This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 456.00.
ToText(456, "###", 2)
This function converts a BigInt value to a String.
Parameter
a - A BigInt value to be converted.
Return value
The return value is a String.
Example
The return value of the following statement is 456.
ToText(456)
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Examples
ToText($4567.123, "$#,##0.00", 3, "," , ".")
ToText($4567.123, "$#,##0.00", 1, "&", "*")
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is $1*234.57.
ToText($1234.57, "$#,###.000", 2, "*")
This function converts a Double value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1236.46.
ToText(1236.456, "###0.00")
This function converts a Double value to a string.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234.6.
ToText(1234.567, 1, ",")
This function converts a Double value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234,57.
ToText(1234.567, 2, "," , ",")
This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234.00.
ToText(1234, 2, ",")
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is $123.5.
ToText($123.456, "$##0.00", 1)
This function converts a Double value to a String.
Parameter
a - A Double value to be converted.
Return value
The return value is a String.
Example
The return value of the following statement is 123.456.
ToText(123.456)
This function converts a Time value to a String.
Parameters
Return value
The return value is a String.
Example
Suppose the time is 08:48:58, the return value of the following statement is 8:48:58.
ToText(ToTime(8,48,58), "h:mm:ss")
This function converts a Time value to a String.
Parameters
Return value
The return value is a String.
Example
Suppose the time is 8:48:58 in the morning, the return value of the following statement is 8:48:58 AM.
ToText(ToTime(8,48,58), "h:mm:ss a", "AM")
This function converts a Time value to a String.
Parameters
Return value
The return value is a String.
Examples
ToText(ToTime(8,48,58), "h:mm:ss a", "AM", "PM")
ToText(ToTime(21,49,59), "h:mm:ss a", "AM", "PM")
This function converts a DateTime value to a String.
Parameter
a - A TimeStamp value to be converted.
Return value
The return value is a String.
Example
Suppose the date is July 15,1999 and time is 7:42:51, the return value of the following statement is 15-Jul-99 7:42:51 AM.
ToText(ToDateTime(1999,7,15,7,42,51))
This function converts a DateTime value to a String.
Parameters
Return value
The return value is a String.
Example
Suppose the date is July 15,1999 and time is 7:42:51, the return value of the following statement is 07-15-99 7:42:51.
ToText(ToDateTime(1999,7,15,7,42,51), "MM-dd-yy h:mm:ss")
This function converts a DateTime value to a String.
Parameters
Return value
The return value is a String.
Example
Suppose the date is July 15,1999 and time is 7:42:51, the return value of the following statement is 15-Jul-99 7:42:51 AM.
ToText(ToDateTime(1999,7,15,7,42,51), "dd-MMM-yy h:mm:ss a", "AM")
This function converts a DateTime value to a String.
Parameters
Return value
The return value is a String.
Examples
ToText(ToDateTime(1999,10,7,7,42,51), "dd-MMM-yy h:mm:ss a", "AM", "PM")
ToText(ToDateTime(1999,10,7,18,42,51), "dd-MMM-yy h:mm:ss a","AM", "PM")
This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 12,345.00.
ToText(12345, 2, ",", ".")
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is $123.45.
ToText($123.45, "$##0.00")
This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 123.00.
ToText(123, 2)
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is $1,234.57.
ToText($1234.567, 2, ",")
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is $123.46.
ToText($123.4567, 2)
This function converts a Double value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 123.46.
ToText(123.456, 2)
This function converts a Currency value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is $1,234.57.
ToText($1234.567, 2, ",", ".")
This function converts a Date value to a String.
Parameter
a - A Data value.
Return value
The return value is a String.
Example
Suppose the date is July 15,1999, the return value of the following statement is 15-Jul-99.
ToText(ToDate(1999,7,15))
This function converts a Currency value to a String.
Parameter
a - A Currency value to be converted.
Return value
The return value is a String.
Example
The return value of the following statement is $123.45.
ToText($123.45)
This function converts a Bit value to a String, either true or false.
Parameter
a - A Bit value.
Return value
The return value is a String.
Example
The return value of the following statement is false.
ToText(3<2)
This function converts a Date value to a String.
Parameters
Return value
The return value is a String.
Example
Suppose the date is July 15,1999, the return value of the following statement is 15-Jul-99.
ToText(ToDate(1999,7,15), "dd-MMM-yy")
This function converts a Time value to a String.
Parameter
a - A Time value.
Return value
The return value is a String.
Example
Suppose the time is 12:40:30, the return value of the following statement is 12:40:30 PM.
ToText(ToTime(12,40,30))
This function converts a Double value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234.57.
ToText(1234.567, "#,###.000", 2, ",")
This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234.00.
ToText(1234, "#,###", 2, ",", ".")
This function converts a Double value to a String.
Parameters
Return value
The return value is a string.
Example
The return value of the following statement is 123.46.
ToText(123.456, "###.00", 2)
This function converts a BigInt value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234.00.
ToText(1234, "#,###", 2, ",", ".")
This function converts a Double value to a String.
Parameters
Return value
The return value is a String.
Example
The return value of the following statement is 1,234.57.
ToText(1234.567, "#,###.000", 2, ",", ".")
Notes:
| Symbol | Meaning | Notes |
|---|---|---|
| 0 | a digit | |
| * | a digit, zero shows as a star | Can't mix 0, *, and _ in same format |
| _ | a digit, zero shows as a space | Can't mix 0, *, and _ in same format |
| # | a digit, zero shows as absent | |
| . | placeholder for decimal separator | |
| , | placeholder for grouping delimiter | Shows the interval to be used |
| ; | separates formats | positive and negative. |
| - | if there is no explicit negative sign, - is prefixed | "0.00" -> "0.00;-0.00" |
| % | divide by 100 and show as percentage | |
| X | any other characters can be used in the prefix or suffix |
| Symbol | Meaning | Presentation | Example |
|---|---|---|---|
| G | era designator | Text | AD |
| y | year | Number | 1996 |
| M | month in year | Text & Number | July & 07 |
| d | day in month | Number | 10 |
| h | hour in am/pm (1~12) | Number | 12 |
| H | hour in day (0~23) | Number | 0 |
| m | minute in hour | Number | 30 |
| s | second in minute | Number | 55 |
| S | millisecond | Number | 978 |
| E | day in week | Text | Tuesday |
| D | day in year | Number | 189 |
| F | day of week in month | Number | 2 (2nd Wed in July) |
| w | week in year | Number | 27 |
| W | week in month | Number | 2 |
| a | am/pm marker | Text | PM |
| k | hour in day (1~24) | Number | 24 |
| K | hour in am/pm (0~11) | Number | 0 |
| z | time zone | Text | Pacific Standard Time |
| ' | escape for text | ||
| '' | single quote |