float CCurrencyRates::ConvertCurrency( float valSum, string curFrom, string curTo, string valDate = "" );
The method ConvertCurrency is used to convert the amount valSum from currency curFrom to currency curTo at the exchange rate set on the date valDate.
|valSum||Amount in the curFrom currency which is to be converted to the curTo currency.|
|curFrom||The currency to be converted.|
|curTo||The currency to which the conversion is to be performed.|
|valDate||The date of the exchange rate is to be used for conversion. If the date is empty, the conversion is performed at the current rate.|
The amount in the destination currency.
<? // suggest the USD and EUR currencies exist in the database $val = 11.95; // amount in USD $newval = CCurrencyRates::ConvertCurrency($val, "USD", "EUR"); echo $val." USD = ".$newval." EUR"; ?>
|© 2001-2005 Bitrix||Bitrix Site Manager - Content Management & Portal Solutions|