6.8.2.9 Money Function

Syntax

money(expression)

Description

The money function returns expression converted to a money value.

Table 6-8: money function                                                                                   

Data Type Conversion                                                                                         

                                                                                                            

boolean The result is undefined.                                                                             

                                                                                                            

date The result is undefined.

                                                                                                            

time The result is undefined.

                                                                                                            

character Expression is converted to a money value with the default formatting set. See Chapter 13,

Formatting Data Values for information about default formatting sets. If the string cannot be converted to a

money value, the result is 0.

                                                                                                            

integer Expression is multiplied by the money decimal place scaling factor in the default formatting set

(multiplied by 100 in the U.S.); see Chapter 13, Formatting Data Values for more information).

                                                                                                            

long Expression is multiplied by the money decimal place scaling factor in the default formatting set

(multiplied by 100 in the U.S.); see Chapter 13, Formatting Data Values for more information).

                                                                                                            

real Expression is multiplied by the money decimal place scaling factor in the default formatting set

(multiplied by 100 in the U.S.); see Chapter 13, Formatting Data Values for more information).

                                                                                                            

money No conversion required.

Example

money ("123.45")