Convert a number to a thousand separator in an email template.

Theodoulos Iacovou asked on January 16, 2023 13:37

Dear Team,

I am currently working on a project in Kentico and I have a question about converting numbers to be separated by thousands and add this method on the autoresponder emails template.

I was wondering if there is a built-in function or method in Kentico that can accomplish this task? If so, could you please provide me with an example of how to use it?

Thank you for your time and assistance.

Correct Answer

Brenden Kehren answered on January 16, 2023 16:43

You can perform your testing in System > Macros > Console but something like this should work:

ToInt("100000100").Format("{0:#,0}")

You can use these pages for reference:

Kentico Macro Methods

Microsoft Composite Formatting

0 votesVote for this answer Unmark Correct answer

Recent Answers


Theodoulos Iacovou answered on January 17, 2023 11:34 (last edited on January 17, 2023 11:35)

Hi Brenden , can we add this micro code on the autoresponder email?

If yes , this format is correct?

{% ToInt("field").Format("{0:#,0}") %}

Thank you

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.