Subject Re: [ib-support] TIME PROBLEM
Author David K. Trudgett
On Monday 2002-03-25 at 12:40:24 -0000, apatri2000 wrote:

> Got a field TEMPO_UNITARIO ( UNITARY_TIME ) declared as numeric(
> 9,4 ) in which i put the TIME necessary to build an object, e.g. 0,20
> stay for 20 minutes, 1,45 stay for 1 hour and 45 minutes.

This would seem to be a bad way to store time durations. It would seem
to make more sense to store 20 minutes as 0.3 and 1 hour 45 minutes as
1.75. I recommend doing that.

If for some odd reason you need time durations in that format, I'd
recommend you use a trigger together with a UDF to populate the field
based on the contents of the decimal formatted field (as I recommended

> Another field PEZZI ( PIECES ) declared as NUMERIC( 9,4 ) hold the
> number of objects to build eg 3 stay for 3 objects to build.
> Problem: how to calculate the total amount of time necessary to build
> all the objects---->
> TOTAL_TIME = UNITARY_TIME * PIECES obvously not work.

Change the format of TEMPO_UNITARIO, or add another, such as

> Please boy, any hint???

Non vuoi risposte dalle ragazze? :-)

David Trudgett