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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Date conversion

RE: Date conversion

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Thu, 23 Jan 2003 02:43:42 -0800
Message-ID: <F001.005382D6.20030123024342@fatcity.com>

 ('binary' encoding is not supported, stored as-is)

>
>Hi all
>
>One of the developers came to me. They are using a
>Genesys call logging
>system.
>
>It has apparently stored a date time in a number
>field as the number of
>seconds since 1970 1 Jan 0:00
>
>They need to know exactly what time this is.
>
>I can not off hand remember that oracle got a
>conversion routine for this.
>
>Anyone know of one, they prefer something already
>there compared to
>something that I write.
>
>
>I was thinking figure out how many days the
>seconds represent, add this to
>the date of 1 Jan 1970. then figure out what time
>of day the remainder
>seconds are to determine the time of day ?
>
>
>Ideas.
>
>George
>________________________________________________
>George Leonard
>Oracle Database Administrator
>Dimension Data (Pty) Ltd

George,

  No such conversion routine, at least in the releases I regularly work with, but you are on the right track. to_date('01/01/1970 00:00:00', 'DD/MM/YYYY HH24:MI:SS') + <your number> / 86400 gives you a date (in the Oracle acceptance of the term) corresponding to the Unix-style timestamp. You just have to apply a to_char() to it with the 'HH24:MI:SS' mask.

HTH, Stephane Faroult
Oriole

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroul
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Thu Jan 23 2003 - 04:43:42 CST

Original text of this message

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