How can I format a number to use 1000 separator (,) and 0 decimal places
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, I am trying to format the number below with a comma separator and round up with 0 decimal places (see below).
Also, I want to align the number to the right. Any help would greatly appreciated!
Input
29722.86
Output
29,723
Thank you.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Marcegon in doing this you’d need to use the ToString() function with the thousand separators argument set to 1 (=Yes). Unfortunately, in doing so, you’ll lose the numeric data type but this is the only way currently. In terms of aligning to the right, this is something you’d need to do in a Table tool, where you can click on a field and set its alignment. When outputting the table tool you’d then need a Render tool instead of a standard Output Data tool.
Edit: I hadn't previously realised that the Table tool will automatically format numbers with thousand separators and so you can just plug your number straight into it and set the decimals to 0:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
