<%
' convert $1.00 US to 9 other currencies:
response.write ConvUSCurrency(1.00, "australian dollars") & "<BR>"
' returns : 1.71
response.write ConvUSCurrency(1.00, "british pounds") & "<BR>"
' returns : 0.66
response.write ConvUSCurrency(1.00, "canadian dollars") & "<BR>"
' returns : 1.47
response.write ConvUSCurrency(1.00, "chinese renminbi") & "<BR>"
' returns : 8.28
response.write ConvUSCurrency(1.00, "french francs") & "<BR>"
' returns : 7.02
response.write ConvUSCurrency(1.00, "german marks") & "<BR>"
' returns : 2.09
response.write ConvUSCurrency(1.00, "japanese yen") & "<BR>"
' returns : 109.08
response.write ConvUSCurrency(1.00, "swedish krona") & "<BR>"
' returns : 9.00
response.write ConvUSCurrency(1.00, "swiss francs") & "<BR>"
' returns : 1.66
%>
<%
Private Function ConvUSCurrency(byVal amnt, byVal convto)
' ############################################
' currency exchange rates change daily.
' These are accurate for July 21, 2000.
' ############################################
dim rate
amnt = FormatNumber( amnt, 4 )
select case ucase( convto )
case "AUSTRALIAN DOLLARS" : rate = 1.7050
case "BRITISH POUNDS" : rate = 0.6593
case "CANADIAN DOLLARS" : rate = 1.4715
case "CHINESE RENMINBI" : rate = 8.2795
case "FRENCH FRANCS" : rate = 7.0208
case "GERMAN MARKS" : rate = 2.0934
case "JAPANESE YEN" : rate = 109.0800
case "SWEDISH KRONA" : rate = 8.9965
case "SWISS FRANCS" : rate = 1.6638
end select
ConvUSCurrency = FormatNumber( (amnt * rate) , 2 )
End Function
%>