473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Converting currency

Jon
I have a field called "Amount". In it, there may be values populated that
are either in £ or $.

I want another field, called "ConvertedAmount" that will store the value in
dollars. If Amount field shows $ or £, it needs to do a calculation to store
the correct value in the ConvertedAmount field, always in $.

Make sense? If so, how!

Jon
Nov 12 '05 #1
1 1443
you don't need to store the 'convertedAmount'
you need, in your existing table
amount
currencyId
transactionDate

tblCurrency
currencyId pk
exchangeRate
effectiveDate

then you need a function that takes calculates the converted (home) amount
given amount, currencyId and date as parameters
"Jon" <da***********@hotmail.com> wrote in message news:<40***********************@lovejoy.zen.co.uk> ...
I have a field called "Amount". In it, there may be values populated that
are either in £ or $.

I want another field, called "ConvertedAmount" that will store the value in
dollars. If Amount field shows $ or £, it needs to do a calculation to store
the correct value in the ConvertedAmount field, always in $.

Make sense? If so, how!

Jon

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marcelo López | last post by:
Hello everybody. I'm working with an office pivot table and i have to convert from its currency type to a decimal (in C#) , operate with the result and then re-convert it to the currency type to...
5
by: Mukesh Kumar | last post by:
hi I am trying to pass range parameters to crystal reports from my .net environment. The start and end values of the range parameters are of currency type. I need to convert the number to currency...
3
by: Caesar Augustus | last post by:
Hello Tom, Long time listener, first time caller... I have been working with vb code to automate a salary increase process that not only rounds to the nearest penny but also rounds to the...
2
by: RC | last post by:
I am getting input from a digital scale and if the weight on the scale is 9.25 pounds, the input looks like: 009.25LB I need to remove the LB and the leading zeros and have the remaining value...
0
by: Marcelo López | last post by:
Hello everybody. I'm working with an office pivot table and i have to convert from its currency type to a decimal (in C#) , operate with the result and then re-convert it to the currency type to...
5
by: Mark | last post by:
I have a field that has been formatted using the vb.net FormatCurrency method. Now, I need to get the amount back into a regular field so I can use it for calculations. Is there an easy way to...
11
by: Penfold | last post by:
I'd appreciate help converting student average test scores into grades. My problem is that I need to allocate one of about 20 grades (3a,3b,3c,4a,4b,4c etc through to 8c plus a couple of others)....
18
by: Daz | last post by:
Hi all! I know this sounds like a stupid question, but I need to varify whether ot not a single char (from a char array) is a number. I have tried using atoi, but it seems to return '0' for any...
116
by: Dilip | last post by:
Recently in our code, I ran into a situation where were stuffing a float inside a double. The precision was extended automatically because of that. To make a long story short, this caused...
0
by: =?ISO-8859-1?Q?Marcel_M=FCller?= | last post by:
clintonb wrote: There is nothing like an original double amount. If you care about rounding errors you must not store any currency value in an approximate number. You must not do this even once....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.