Subject | Re: [IBO] Time Fields |
---|---|
Author | Paul Schmidt |
Post date | 2001-01-30T16:09:55Z |
Svein:
On 30 Jan 2001, at 8:04, Svein Erling Tysvær wrote:
To: IBObjects@yahoogroups.com
From: Svein Erling Tysvær <svein.erling.tysvaer@...>
Date sent: Tue, 30 Jan 2001 08:04:44 +0100
Send reply to: IBObjects@yahoogroups.com
Subject: Re: [IBO] Time Fields
> Paul,
> I'd say challenge is exaggerating a bit:
>
> SELECT cast((END_TIME-START_TIME)*4 as Integer)/4
> FROM your_table
>
> Or did I miss something?
Actually you did, but your next message does get it. I didn't
realise that you could add, subtract, multiply and I assume divide
time values. There is a question though, still in my mind, does
this work for dates and timestamps as well?
Paul
>
> HTH,
> Set
>
> At 11:54 29.01.2001 -0500, you wrote:
> >
> >Here is an interesting challenge to all.
> >
> >ITable that contains two time values, START_TIME and END_TIME, now I
> >want to calculate the number of hours difference between them, with a
> > slight twist, according to the following table:
> >
> >Minutes Start-Time End-Time
> >
> >< 15 0.0 0.25
> >16 - 30 0.25 0.50
> >31 - 45 0.50 0.75
> >46 - 59 0.75 1.00
> >
> >So from 14:03 to 14:58, would be calculated as from 14.00 to 15.00
> >and return 1.00 hours.
> >
> >I know that the stored procedure for this, is going to win an ugly
> >contest, but I would like to be able to keep the actual physical
> >times, as well as the "rounded" times.
> >
> >Paul
> >
> >
> >Paul Schmidt,
> >Tricat Technologies
> >Email: paul@...
> >Website: www.tricattechnologies.com
> >
> >
> >
> >
> >
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-~> eGroups is now Yahoo! Groups Click here for
> more details http://click.egroups.com/1/11231/1/_/685810/_/980838149/
> ---------------------------------------------------------------------_
> ->
>
>
>
>
Paul Schmidt,
Tricat Technologies
Email: paul@...
Website: www.tricattechnologies.com