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

Whole Number

Status
Not open for further replies.

haneen97

Programmer
Joined
Dec 10, 2002
Messages
280
Location
US
Hi
Is there a function in Crystal 8.5 that will give you the whole number when dividing by a certain number?

For example if I divide 9/4, Can I put the 2 in the variable and ignore the fraction?

Thanks a lot

Mo
 
You can use the Int function to only return the integer portion:

Int(9/4) // will result in 2
Int(9/5) // will result in 1

-dave
 
Try:

truncate({table.field}/2)

Cheers,

-LW
 
Thank you all,
Great stuff.

Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top