Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jun 2009
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pesos to USD Conversion

    I have a table, Production, that has a field titled, Revenue. The field is stored in a number field. In my case, it's represents a total in Pesos. I have a second table, ExchangeRates, that store the Exchange Rate (in my case it's a monthly average). So for example, I could have the following data in each table:

    Production
    Property - 10
    Revenue - 5963.8
    Year - 2010
    Month - 11

    ExchangeRate
    Property - 10
    Year - 2010
    Month - 11
    Rate - 11.6%

    I need to covert the Revenue field to US Dollars (USD) via SQL. I thought I would take this route: USDRoomRevenue: Revenue/Rate (formatted as currency). Unfortunately, I get the following result: $51,412.07. I should instead get $514.12. Any advice?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Try

    Code:
    USDRoomRevenue: Round(Revenue/(Rate * 100),2)
    11.6% is another way of writing .116

    11.6% * 100 = 11.6 There are 11.6 Pesos in a dollar.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •