Page 1 of 1
no money data type
Posted: Thu Dec 12, 2002 4:36 pm
by MiniMe
Since there is no money data type is there an easy way to convert 16.299999 to 16.29 during the select statement??
no money data type
Posted: Thu Dec 12, 2002 4:48 pm
by Kai
You can convert it when you print it in Vortex (after the SELECT):
<fmt "%1.2lf" $value>
or better yet:
<fmt "%1.2klf" $value>
which will print commas every factor of 1000.
no money data type
Posted: Thu Dec 12, 2002 4:50 pm
by MiniMe
actually I am writing this in perl so I was hoping to be able to do it in the select statement. I will use sprintf in perl. thanks.
no money data type
Posted: Thu Dec 12, 2002 4:58 pm
by mark
Use fmt %.2f when displaying the number. 16.29999999 would be properly displayed as 16.30 .
Or use integers and convert to string and insert decimal point when displaying.
no money data type
Posted: Thu Dec 12, 2002 4:59 pm
by mark
%.2f should work in any sprintf variant.