FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index All products support Arrotondare un prezzo
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Arrotondare un prezzo
Posted: Mon Apr 27, 2020 02:48 PM

E' possibile arrotondare un prezzo ?
per esempio io ho calcolato un prezzo di 8.57 come posso portarlo a 9.00
cioè non lo saprei io se ha decimali dovrebbe arrotondare automaticamente
tanto tempo fa qualcuno aveva fatto una funzione ma in fw+ clipper si poteva settare quanto arrotondare
ma adesso non ho trovato quella funzione ed ho problemi

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Arrotondare un prezzo
Posted: Sat May 02, 2020 05:31 PM
Ciao Silvio,

devi usare la funzione ROUND(<nNumber>, <nDecimals>)

nDecimals è il numero di decimali a cui vuoi arrotondare

Ad esempio se vuoi arrotondare 8.57 a 9.00

Code (fw): Select all Collapse
 ROUND( 8.57, 0 )


Buona serata
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Arrotondare un prezzo
Posted: Mon Aug 31, 2020 02:00 PM

cercavo una funzione come roundup

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: Arrotondare un prezzo
Posted: Mon Aug 31, 2020 03:07 PM
forse Ceiling?
che poi è lo stesso di fare round(x+0.5,0)

Continue the discussion