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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove a decimal E.g. 0.56 = 56

Status
Not open for further replies.
Dec 29, 2007
10
GB
Hi

I have been looking all over Cyrstal help and internet to find the solution to this problem:

I need to remove decimals from the value in a variable so that I can use the below code to convert minutes into hours:

If HourRem <> 00 then 1/(60/HourRem);

For example 0.30 = 1/(60/HourRem = 30) = 0.5.

I know in SqlServer this function is called Convert.ToDecimal if that is of any help? I have also looked at the date and time functions and these do not help either.

Has anyone got any ideas?

Thanks for your help.
 
Are you saying you want your example to return 50 instead of .5? Multiply by 100.

There is no function to do this that I am aware of. It is awfully easy to multiply by 100 so I doubt that anyone would create such a function.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top