Subject | Re: [IBO] Time Fields |
---|---|
Author | Jason Wharton |
Post date | 2001-01-30T00:58:50Z |
Paul,
Make a stored procedure that will do the substitutions and then you could
add COMPUTED columns that return the results of the stored procedure. I
think this should work.. Never tried it. But, if it did then you could use
regular SQL and abstract the invocation of the stored procedure to the
table's COMPUTED handling.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
Make a stored procedure that will do the substitutions and then you could
add COMPUTED columns that return the results of the stored procedure. I
think this should work.. Never tried it. But, if it did then you could use
regular SQL and abstract the invocation of the stored procedure to the
table's COMPUTED handling.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Paul Schmidt" <paul@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, January 29, 2001 9:54 AM
Subject: [IBO] Time Fields
>
> 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
>
>
>
>