Subject Follow Up : 'Time manipulation' or 'The Vulcan Science Directorate says
Author Derek Basch
Ok, Ive run into a small problem:

> You, of course, have to extract the H:M:S from the ProcessTime
> when you're
> going to display it.

I am using a VIEW for the dataset and VIEW's dont allow for columns
based on the return sets of stored procedures.

from the manual:
CREATE VIEW name [( view_col [, view_col …])]
AS <select> [WITH CHECK OPTION];
Note You cannot define a view that is based on the result set of a
stored procedure.

I cant think of any other way to extract the H:M:S except a stored
procedure. Has anyone else dealt with this?
Thanks,
Derek Basch

--- In ib-support@y..., "Greg Peterson" <maxint@c...> wrote:
> I always use the smallest unit of interest stored in an Integer
(Or Int64 if
> need be)
>
> If a process take 3 hours 14 minutes and 22 second then I'd store
it as:
> ProcessTime := 22 + (14*60) + (3 *3600).
>
> You, of course, have to extract the H:M:S from the ProcessTime
when you're
> going to display it.
>
> Procedure ExtractHMS (Var H : Integer; var M : Integer; var S :
Integer;
> ProcessTime : Integer);
> begin
> H := ProcessTime DIV 3600;
> ProcessTime := ProcessTime - (H*3600);
> M := ProcessTime DIV 60;
> ProcessTime := ProcessTime - (M*60);
> S := ProcessTime; // what ever is left over
> end;
>
>
> Hope this helps -- Greg