Difference between revisions of "Documentation/How Tos/Calc: DOLLAR function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
Line 16: Line 16:
 
<tt>'''DOLLAR(367.456; 2)'''</tt>
 
<tt>'''DOLLAR(367.456; 2)'''</tt>
 
: returns <tt>'''$367.46'''</tt>, if your currency is US dollars.
 
: returns <tt>'''$367.46'''</tt>, if your currency is US dollars.
 +
 +
=== Issues: ===
 +
* Because it depends on local settings, <tt>'''DOLLAR'''</tt> should not be regarded as portable.
  
 
{{Documentation/SeeAlso|
 
{{Documentation/SeeAlso|
Line 24: Line 27:
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
=== Issues: ===
 
* Because it depends on local settings, <tt>'''DOLLAR'''</tt> should not be regarded as portable.
 

Revision as of 10:08, 2 March 2009


DOLLAR

Returns text representing a number in your local currency format.

Syntax:

DOLLAR(number; decimals)

returns text representing number as currency. decimals (optional, assumed to be 2 if omitted) sets the number of decimal places.
Tools - Options - Language Settings - Languages - 'Default Currency' sets the currency to be used (normally be the currency of your locale).

Example:

DOLLAR(255)

returns $255.00, if your currency is US dollars.

DOLLAR(367.456; 2)

returns $367.46, if your currency is US dollars.

Issues:

  • Because it depends on local settings, DOLLAR should not be regarded as portable.

Template:Documentation/SeeAlso

Personal tools