Subject Re: TIME PROBLEM
Author apatri2000
--- In ib-support@y..., Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
> Not having appeared at its target 3 and a half hours after I sent
it,
> whereas other messages appears instantly, I've decided to resend my
answer:
>
> >Date: Tue, 26 Mar 2002 08:30:31 +0100
> >To: ib-support@y...
> >From: Svein Erling Tysvær <svein.erling.tysvaer@k...>
> >Subject: Re: [ib-support] TIME PROBLEM
> >
> >Tony,
> >your problem is that you want 1 = 0,6 in calculations, something I
suspect
> is impossible. To make calculations, you have to choose between
> >
> >a) store everything as minutes (i.e. 20m = 20, 1h45m = 105)
> >b) store everything as hours (i.e. 20m = 0,3333, 1h45m = 1,75)
> >
> >Whichever you choose, calculations become simple. If you insist on
storing
> things only as 20m = 0,20, 1h45m = 1,45, I think you have to write
a UDF or
> something to parse each value and transform to a format matching a)
or b)
> above before attempting to calculate anything.
> >
> >HTH,
> >Set