Currentcy Calculation

ATB

Registered User.
Local time
Today, 11:41
Joined
Dec 7, 2000
Messages
30
Is it possible for me to round up a calculated curency field in a query to the nearest 49p or 99p. Example £2.57 becomes £2.99.

Thanks.
 
Say that, in your query, the field holding your currency result is named X
Then add in a new column of the QBE grid, in the firts line:

RoundedResult : iif(((X-int(X))* 10 \ 5) = 0, int(X) + 0.49, int X + 0.99)

Alex

[This message has been edited by Alexandre (edited 02-01-2002).]
 
or

roundup = (int(x*2)/2+0.49)
 
? Kkilfoil
I don t seem to have a roundup function in A2K?

Alex
 
Cheers Alex. The code work well.

ATB
 
Alexandre:

Roundup was my fieldname! (I left out the ':' in my defn)
 

Users who are viewing this thread

Back
Top Bottom