EUROw.d Format

Writes numeric values with a leading euro symbol (E), a comma that separates every three digits, and a period that separates the decimal fraction.
Category: Numeric
Alignment: right

Syntax

EUROw.d

Syntax Description

w
specifies the width of the output field.
Default:6
Range:1-32
Tip:If you want the euro symbol to be part of the output, be sure to choose an adequate width.
d
specifies the number of digits to the right of the decimal point in the numeric value.
Default:0
Range:0-31
Requirement:must be less than w

Comparisons

  • The EUROw.d format is similar to the EUROXw.d format, but EUROXw.d format reverses the roles of the decimal point and the comma. This convention is common in European countries.
  • The EUROw.d format is similar to the DOLLARw.d format, except that DOLLARw.d format writes a leading dollar sign instead of the euro symbol.

Example

These examples use 1254.71 as the value of amount.
Statements
Results
----+----1----+----2----+----3
put amount euro10.2;
 E1,254.71
put amount euro5.; 
1,255
put amount euro9.2;
E1,254.71
put amount euro15.3;
     E1,254.710
data _null_;   
   input x;
   put x euro10.2;
   put x euro5.; 
   put x euro9.2;
   put x euro15.3;
   datalines;
1254.71
;
run;
SAS Log:
 E1,254.71
1,255
E1,254.71
     E1,254.710
/* This code determines the default length. */
data _null_;
   input x;
   put x euro.;
   datalines;
1
22
333
4444
55555
666666
7777777
88888888
999999999
1234561234
;run;
SAS Log:
     datalines;
    E1
   E22
  E333
E4,444
55,555
666666
7.78E6
8.89E7
   1E9
1.23E9
NOTE: At least one W.D format was too small for the number to be printed. 
The decimal may be shifted by the "BEST" format.
/* This code determines the range. */
data _null_;
   input x;
   put x euro5.;
   put x euro6.;
   put x euro7.;
   put x euro8.;
   put x euro9.;
   put x euro9.2;
   put x euro10.;
   put x euro10.2;
   put x euro10.4;
   put x euro11.;
   put x euro11.3;
   put x euro12.;
   put x euro12.2;
   put x euro13.;
   put x euro13.2;
   datalines;
333
4444
55555
666666
7777777
88888888
999999999
1234561234
;run;

See Also

Format: