Why not try to remove the dot from your float value, convert it to integer (to get rid of the starting zeroes) and then insert a dot after two chars of the resulting string, convert it to float and then

But I'm still somewhat confused. In your first example you said:
>I have some float fields in a database example the yen 127.60 I need to convert this to be left with a round integer value of 128
Which would indeed be rounding, unlike
SomeInt:=Trunc(AFloat*100);

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Sorry, I still don't get it; maybe someone else understands what you are trying to do....

Round(127.60) will result in 128
Round(1.04) will result in 1, not 104

Rounding uses the fractional part of the number to either increment (or not) the whole part of the number, the result is an integer value (whole number, no fractions) that much we can all agree on. The confusion is coming from your statement of "104" from 1.04 . The only way to come up with that is to multiply 1.04 * 100, resulting in 104.00 and then Round that number. If you did the same to 127.60, eg:

127.60 * 100
= 12760.00
Round(12760)
= 12760

The results you are looking for; 104 and 128; cannot be achieved using a single function, as the math you are applying to each is different.

What you are dealing with here is called "scaling". In your first example, no scaling was applied. In the 104 from 1.04 example, a scaling of 2 was applied (10^2), in this last example, the scaling applied was 4 (10^4). The math is easy, but you will need to specify the scaling factor to be applied to the values (each value had a different scale applied).

Euro V Dollar Days High = 1.3130 Days Low = 1.3030 I need to remove the decimal point and end up with 100 this is the pips spread for the day.
Euro V Sterling Days High = 0.6780 Days Low = 0.6760 I need to remove the decimal point and the zeros and end up with 20 this is the pips spread for the day.
Sterlin V Yen Days High = 227.73 Days Low = 227.48 I need to remove the decimal point and end up with 25 this is the pips spread for the day.

Andy,
Again it comes down to scaling, which we can't determine for you. Your scaling (point spead) is based on the currency being evaluated. The numbers themselves do not determine the scaling factor to apply, its what they represent (currency-wise) that does. YOU need to determine that part.

Why not try to remove the dot from your float value, convert it to integer (to get rid of the starting zeroes) and then insert a dot after two chars of the resulting string, convert it to float and then round it?

Featured Post

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Creating an auto free TStringList
The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list.
In such cases, you have to…

Have you ever had your Delphi form/application just hanging while waiting for data to load?
This is the article to read if you want to learn some things about adding threads for data loading in the background.
First, I'll setup a general applica…

Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…