Magento update currency rates from base currency to current currency

Magento: here is code to fetch current currency code and to get default(base) currency code in magento

<?php 

Mage::app()->getStore()->getDefaultCurrencyCode();

Mage::app()->getStore()->getCurrentCurrencyCode();
?>

Update price based from base currency to current currency in magento

<?php

$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); 
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode(); 

$price = Mage::helper('directory')->currencyConvert($pricetoconvert, $baseCurrencyCode, $currentCurrencyCode); 

?>