# Thread: Divide Problem, I want code doing no round for me

1. Registered User
Join Date
May 2004
Location
CHINA Taiwan
Posts
3

## Unanswered: Divide Problem, I want code doing no round for me

well,
#---
define i decimal(4,1),
j smallint,
k smallint,

Let i = 172
Let j=i/60
Let k = i mod 60
#---
k has no problem here...

So, my j is going to be 3
But I wished it to be 2
this is a serious question when I make 172 minutes to be 2(j)hours and (k) minutes

I thinked a lot and there is no way out...
How to solve this, PLEASE.

2. Registered User
Join Date
May 2004
Location
Barcelona, Spain
Posts
54
two ways:

Let i = 172
Let j=TRUNC(i/60)
Let k = i mod 60

Let i = 172
Let k = i mod 60
Let j=(i-k)/60

cheers

3. Registered User
Join Date
May 2004
Location
CHINA Taiwan
Posts
3
Thank you, I watched your post finally found I asked a question I never thought that answer, my brain is slow....
I am a newbie and asked a newbie question.
I like the second way, so people may know what i want to explain.

Thanks again.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•