Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get minutes????

Re: How to get minutes????

From: Christopher Merry <merryct_at_constructingbits.com>
Date: Wed, 19 Jun 2002 18:08:19 -0700
Message-ID: <uh2av6gpk6r5ac@corp.supernews.com>


The CONVERT function is used to convert characters from one character set to another. For example from latin to ASCII. I don't think that is what you are looking for.

In order to use the time component of any date, you must isolate that information. Use the TO_CHAR( ) function to do this. The syntax for TO_CHAR is as follows:

TO_CHAR( date, format )

Example: TO_CHAR( log_end_date, 'HH24MISS' )

Have you tried the following:

TO_NUMBER(TO_CHAR(log_end_date, 'HH24MISS')) - TO_NUMBER(TO_CHAR(log_start_date, 'HH24MISS'))

The above statement assumes the start date and end date are always on the same day. I'll let you figure out the necessary logic if they are not.

Oracle9i now has a TIMESTAMP datatype that may be more applicable in your case. You might want to check it out.

Hope that helps...

cm

"William F. O'Neill" <wfoneill_at_mindspring.com> wrote in message news:aer7mn$5sn$1_at_slb2.atl.mindspring.net...
> Am using Powerbuilder 8.0.2 with Oracle9i on WIN2K
> Am attempting to create a report, in which I must take the 'time' value of
> one field and substract it from the 'time' value of another field, and
have
> the result in minutes. I will of course use a 'computed field' to
> accomplish this, but nothing I've tried seems to work. Think the problem
> lies with how to do this with Oracle within PB. Time(log_end_date) -
> time(log_start_date) burps! Have a feeling I should use convert(), but
don't
> know the parameters... Any hints?
>
>
>
>
>
>
Received on Wed Jun 19 2002 - 20:08:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US