EUROCURR Function

Converts one European currency to another.
Category: Currency Conversion

Syntax

EUROCURR(from-currency-amount, from-currency-code, to-currency-code)

Required Arguments

from-currency-amount
is a numeric value that specifies the amount to convert.
from-currency-code
specifies a three-character currency code that identifies the currency that you are converting from. (See European Currency and Currency Codes .)
Tip:If from-currency-code has a blank value, EUROCURR converts currency values from euros to the currency of the European country that you specify.
to-currency-code
specifies a three-character currency code that identifies the currency that you are converting to. (See European Currency and Currency Codes .)
Tip:If to-currency-code has a blank value, EUROCURR converts values from the currency of the European country that you specify to euros.

Details

The following table lists European currencies and the associated currency codes. Use the currency codes to identify the type of currency that you are converting to or converting from. Several countries use the Euro as their currency instead of the currency listed in the following table. This information is provided in order to satisfy user's historical data.buildnlsOTKEY
European Currency and Currency Codes
Currency
Currency code
Austrian schilling
ATS
Belgian franc
BEF
British pound sterling
GBP
Czech koruna
CZK
Danish krone
DKK
Deutsche mark
DEM
Dutch guilder
NLG
Euro
EUR
Finnish markka
FIM
French franc
FRF
Greek drachma
GRD
Hungarian forint
HUF
Irish pound
IEP
Italian lira
ITL
Luxembourg franc
LUF
Norwegian krone
NOK
Polish zloty
PLZ
Portuguese escudo
PTE
Romanian leu
ROL
Russian ruble
RUR
Slovenian tolar
SIT
Spanish peseta
ESP
Swedish krona
SEK
Swiss franc
CHF
Turkish lira
TRL
Yugoslavian dinar
YUD
The EUROCURR function converts a specific country's currency to an equivalent amount in another country's currency. It can also convert a specific country's currency to euros. EUROCURR uses the values in either the fixed currency conversion rate table or the changeable currency conversion rate table to convert currency.
If you are converting from one country's currency to euros, SAS divides by thatfrom-currency-amount country's rate from one of the conversion rate tables. See Converting from Deutsche Marks to Euros . If you are converting from euros to a country's currency, SAS multiplies by thatfrom-currency-amount country's rate from one of the conversion rate tables. See Converting from Euros to Deutsche Marks . If you are converting one country's currency to another country's currency, SAS first converts the from-currency-amount to euros. SAS stores the intermediate value in as much precision as your operating environment allows, and does not round the value. SAS then converts the amount in euros to an amount in the currency that you are converting to. See Converting from French Francs to Deutsche Marks .

Examples

Example 1: Converting from Deutsche Marks to Euros

The following example converts one Deutsche mark to an equivalent amount of euros.
data _null_;
   amount=eurocurr(50,'dem','eur');
   put amount= ;
run;
The value in the SAS log is: amount=25.56459406.

Example 2: Converting from Euros to Deutsche Marks

The following example converts one euro to an equivalent amount of Deutsche marks.
data _null_;
   amount=eurocurr(25,'eur','dem');
   put amount= ;
run;
The value in the SAS log is: amount=48.89575.

Example 3: Converting from French Francs to Deutsche Marks

The following example converts 50 French francs to an equivalent amount of Deutsche marks.
data _null_;
   x=50;
   amount=eurocurr(x,'frf','dem');
   put amount=;
run;
The value in the SAS log is: amount=14.908218069.

Example 4: Converting Currency When One Variable Is Blank

The following example converts 50 euros to Deutsche marks.
data _null_;
   x=50;
   amount=eurocurr(x,' ','dem');
   put amount=;
run;
The value in the SAS log is: amount=97.7915.