ATB
02-01-2002, 12:36 AM
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.
Thanks.
|
View Full Version : Currentcy Calculation ATB 02-01-2002, 12:36 AM 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. Alexandre 02-01-2002, 05:05 AM 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).] KKilfoil 02-01-2002, 08:43 AM or roundup = (int(x*2)/2+0.49) Alexandre 02-01-2002, 09:18 AM ? Kkilfoil I don t seem to have a roundup function in A2K? Alex ATB 02-02-2002, 02:59 AM Cheers Alex. The code work well. ATB KKilfoil 02-04-2002, 04:21 AM Alexandre: Roundup was my fieldname! (I left out the ':' in my defn) Alexandre 02-04-2002, 07:46 AM :0 |