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 format

Re: Date format

From: <Winnie_Liu_at_infonet.com>
Date: Tue, 16 May 2000 11:06:02 -0700
Message-Id: <10499.105763@fatcity.com>


Antje,

Tried this logic:

select to_char(sysdate -
(to_char(sysdate,'j')-((958348800/(60*60*24))+to_char(to_date('01-Jan-1970'
,'dd-mon-yyyy'),'j'))),'dd-mon-yyyy')
from dual;

958348800 is the number of seconds from 01-jan-1970 to 15-may-2000.

Substitute that with your number.

I only test this out with yesterday's date. Do test on this logic before using it.

Winnie

"Sackwitz, Antje" <Sackwitz_at_vst.vossloh.de> on 05/16/2000 03:40:27 AM

Please respond to ORACLE-L_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Winnie Liu/HQ/ISC)

Subject: Date format

Hi,
I have a long field in my table containing the date in seconds since 01.01.1970.
Now I need a function/procedure to calculate the date in format dd.mm.yyyy min:sec to display date in select statements. Can anyone share knowledge to that task? We are running Oracle8.1.5.

Regards,
Antje


Antje Sackwitz                  Phone: +49-431-7109-514
Vossloh System-Technik GmbH     Fax:   +49-431-7109-675
Edisonstr. 3                    E-Mail: sackwitz_at_vst.vossloh.de
24145 Kiel
--
Author: Sackwitz, Antje
  INET: Sackwitz_at_vst.vossloh.de

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 Tue May 16 2000 - 13:06:02 CDT

Original text of this message

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