Subject Re: [ib-support] Re: sum( time fields) Helen Borrie 2001-02-12T16:46:34Z
At 03:43 PM 12-02-01 +0000, you wrote:
>
>I have already done a procedure which calculates my necessity.
>The remain problem is that Interbase return me the SUM( TIME FIELD )
>in a Centesimal form.
>eg: 1:30 go down in 1,50.
>What I need is the sintax to transform a 1,50 in 1,30.
>
>I have already try: >> result - int( result ) / 1.666 << , but
>Interbase don't recognize the command int.
>
>Somebody want help??

Look at the UDF libraries - you may find what you want there. Links are on the interbase2000 tools page.

Helen

>Thanks
>Arnaldo
>
>--- In ib-support@y..., Helen Borrie <helebor@w...> wrote:
> > At 03:01 PM 12-02-01 +0000, you wrote:
> > >Hi All.
> > >Sorry to post this argument another time, but...
> > >
> > >Now i got the decimal parts of the resulting hour in centesimal:
> > >eg:
> > >
> > >3,30 is turn into 3,50
> > >
> > >This is the code thanks to Ann:
> > >
> > >sum( ( cast(presenze.orelavorate - cast( '0.00.00' as time ) as
> > >numeric(9,3) ) )/60/60 )
> > >
> > >give me 3,50.
> > >but I want 3,30. As usual
> > >
> > >How to tell to interbase to transform a centesimal time in
> > >sessagesimal one?
> >
> >
> > Create a UDF that accepts the value part, calculates the centimal
>part as seconds and returns a string which you can either a store in
>the table or calculate in DSQL.
> >
> > However, I understood that you wanted to use this figure for
>accumulating elapsed time. Don't you need a numeric for that?
> >
> > HB
> >
> >
> >
> > All for Open and Open for All
> > InterBase Developer Initiative · http://www.interbase2000.org
> > _______________________________________________________
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>

All for Open and Open for All
InterBase Developer Initiative · http://www.interbase2000.org
_______________________________________________________