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

Home -> Community -> Usenet -> c.d.o.server -> Re: command to display time in DATE format

Re: command to display time in DATE format

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 6 Jun 2006 09:16:22 -0700
Message-ID: <1149610582.500559.287200@j55g2000cwa.googlegroups.com>

Jim Kennedy wrote:
> <mehaboob_at_gmail.com> wrote in message
> news:1149603061.349299.173000_at_c74g2000cwc.googlegroups.com...
> > Hi,
> >
> > In oracle DB table,I have a varchar field which stores time in EPOCH
> > fomat
> > for eg:11652232 secs
> >
> > Is there a command to display the above time in Date format? (something
> > like DD MM YY)
> >
> > Mehaboob
> >
>
> Why store numbers in character fields? Store numbers in number fields.
> (myfield/(24*60*60))+to_date('01/01/1970','mm/dd/yyyy'),
> Jim

Mehaboob, to display a date in any character representation always use to_char. So jjust put a to_char around Jim's calculation: to_char( column / (24 * 60 * 60) + to_date('01-01-1970','mm-dd-yyyy'),' DD MM YY')

HTH -- Mark D Powell -- Received on Tue Jun 06 2006 - 11:16:22 CDT

Original text of this message

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