[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: DateTime - Computing Elapse job time



Thanks Hugh, works great  - hope I can return the favor to group someday.





Vishner@AOL.COM on 07/13/2000 02:03:38 PM

Please respond to sqr-users@list.iex.net

To:   SQR-USERS@list.iex.net
cc:    (bcc: Steve Talley/TPA/AdvanTech)

Subject:  Re: DateTime - Computing Elapse job time




It appears that the difference is passed as part of a day. You could add this
difference to (midnight of ) an arbitrary date and then get the time component.
This would work for time periods less than 24 hours:

SELECT
A.PRCSNAME,
to_char(A.BEGINDTTM,'mm/dd/yy hh:mi:ss'),
to_char(A.ENDDTTM,'mm/dd/yy hh:mi:ss'),
to_char(to_date('010101','mmddyy')
            + (A.enddttm - A.begindttm),'HH24:MI:SS')
FROM PSPRCSRQST A


HTH,
Hugh



In a message dated Thu, 13 Jul 2000  1:34:49 PM Eastern Daylight Time,
Steve_Talley@ADVANTECHSOLUTIONS.COM writes:

<< Hello all  and thanks in advance -

I need to compute wall time for particular batch job.  For psoft users, I am
looking at the following:

Table:  PSPRCSRQST
Fields (Begindttm, Enddttm)    -- In Oracle 734 date format

What I would like is to subtract the begin time from the end time resulting in
elapse time.  However, I am having formatting problems in SQL.  Can anyone
provide me an SQL statement to do this?  Or perhaps someother means.  Thanks
again.

SELECT
A.PRCSNAME,
A.BEGINDTTM,
A.ENDDTTM,
a.enddttm - a.begindttm                  -- Need to compute this and then
format...but having problems.
  FROM PSPRCSRQST A
 >>