Tech Tip: Formatting a number to save as a text variable
PRODUCT: 4D | VERSION: 13.0 | PLATFORM: Mac & Win
Published On: June 2, 2012
The 4D String command can be used to save a formatted number in a text variable. Here is an example of how a number can be formatted and saved in a text variable with comma separators:
C_LONGINT(Number_Variable_l) C_TEXT(Text_Variable_t) Number_Variable_l:=1000000 Text_Variable_t:=String(Number_Variable_l;"#,###,##0") //Text_Variable_t returns "1,000,000" |