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!

Rounding Problem CDec can help??????

Status
Not open for further replies.

DaveMac

Technical User
Apr 9, 2000
161
US
Has anyone used the Cdec function. I thought I had it working but could not get it right. I have a Value on a report that is (Count(*)) of a detail that is recorded every one minute. Thus the Count(*) is Number_of_Minutes. I want to take the Number_of_Minutes / 60 = Number_of_Hours . The problem is I do not want the decimal and I do not want it to round up. If it’s 45 min it should result to 0 same if 179 min should result to 2.

Thanks!!!
 
Would the Int() function help. That will return just the whole number without the fraction.
Int(Number_of_Minutes / 60 )
Paul
 
And there you have it! I Dim'ed it as an integer and never thought to try the int().
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top