Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Get # of seconds between 2 dates
In Sybase there is function called DATEDIFF(datepart,date,date) which returns
the amount of time between the second and first of two dates, converted to the
specified date part, for example, months, days, hours.
In Oracle I don't see that kind date function. we have functions like add_months, months_between,last_day, next_day and new_time. This NEW_TIME returns the date and time in time zone z2 when date and time in time zone z1 are d. Here I go with an example :
select new_time(sysdate,'GMT','PST');
returns the date and time of Zone PST.
Veera
"Cale, Rick T (Richard)" wrote:
> Hi All,
>
> Are there any Oracle functions that take 2 dates and returns the difference
> in seconds or
> other time units?
>
> Thanks
> Rick
>
> Rick Cale, Science Applications International Corp.
> Phone:865-481-2198, fax:865-481-8555
> e-mail: caler_at_saic.com
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Cale, Rick T (Richard)
> INET: RICHARD.T.CALE_at_saic.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Mon Oct 30 2000 - 15:42:19 CST
![]() |
![]() |