Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing to decimal 1

Status
Not open for further replies.

Layth

IS-IT--Management
Jun 7, 2005
44
US
I need to return a decimal dollar amount, to decimal places, from the code below, I know its something simple, but I have tried decimal, float, double and none of these work.

Here's the code
Code:
[START THE EQUATIONS HERE].[MIN Of INSERTIONCOST] * ([START THE EQUATIONS HERE].[Total Of AMPORDERFK] - 1) AS SubInsertionCost


Thank you in advance,

Layth
 
Hi. Not sure what you mean? You have a decimal and you're trying to make it into a decimal? Maybe some sample data would help. Please tell us the data, show us the output of your current "nonworking" code, and then how you'd like it to look. Thanks.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
sure I have data that will end up as:
101
132.3
45.3243242

I need

101.00
132.30
45.32
 
Do you want to keep the data as-is, but just display/format it as two decimal places?

FORMAT(EquationHere,"0.00")

Or do you want to round the number?

(cint(((EquationHere)+.005)*100))/100

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
either or, both of these work great!
thank you,
layth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top