Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Round to two decimal places

New Here ,
Mar 23, 2011 Mar 23, 2011

How do you round a number to two decimal places?

19.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 23, 2011 Mar 23, 2011

numberformat()

Translate
Contributor ,
Mar 23, 2011 Mar 23, 2011

will output 12.36

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 23, 2011 Mar 23, 2011

numberformat()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 23, 2011 Mar 23, 2011

Hi

Try this.Am assuming variable name as 'price'

               #NumberFormat(price,'_____.__')#

     or

               #NumberFormat(price, "00.00")#

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 24, 2011 Mar 24, 2011

You can also use :

#DecimalFormat(number)#

Description

Converts a number to a decimal-formatted string.

Returns

A number as a string formatted with two decimal places and a thousands separator.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 24, 2011 Mar 24, 2011
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 24, 2011 Mar 24, 2011

Why? I mean... no-one would ever use it.

Apparently.

It's like you're suggesting people RTFM (Read The FREELY-AVAILABLE Manual ;-). It won't catch on.

I think the big problem here is that things are so difficult to find stuff on the Web. So how would people be able to find this freely-available manual? If only there was some sort of engine people could use to search for stuff. Then they could JFGI (Just Find Good Information).

Cough.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 24, 2011 Mar 24, 2011
LATEST
If only there was some sort of engine people could use to search for stuff.

This is a ridiculous concept and will never catch on.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources