I have a numeric variable that I would like to convert into a string variable with commas separating thousands.
I have tried:
tostring n, g(n_string) format(%4.0fc)
but that gives me a string that is identical to the numeric variable:
| n | n_string |
| 61467 | 61467 |
| 1118 | 1118 |
| 1499 | 1499 |
| 68 | 68 |
| 1291 | 1291 |
| 1381 | 1381 |
| n | n_string |
| 61467 | 61,467 |
| 1118 | 1,118 |
| 1499 | 1,499 |
| 68 | 68 |
| 1291 | 1,291 |
| 1381 | 1,381 |
Thank you in advance.
/Amalie
0 Response to Insert comma in string variable
Post a Comment