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: SQL*Plus display format question

Re: SQL*Plus display format question

From: Spencer <spencerp_at_swbell.net>
Date: Sat, 27 Jan 2001 10:37:55 -0600
Message-ID: <EPCc6.56$Yq5.8127@nnrp2.sbc.net>

wrapping the expression in a SUBSTR function will also work: e.g.

SUBSTR( to_char(sysdate,'mm/dd/yyyy hh24:mi:ss') ,1,19)

note: the 'hh' format will return the hour as 01 thru 12, so you may want to consider returning the hour in 24-hour format as 00 thru 23 ('hh24'), or include the am/pm string.

HTH "David Fitzjarrell" <oratune_at_aol.com> wrote in message news:94sd30$2ns$1_at_nnrp1.deja.com...
> In our last gripping episode wax_man_at_my-deja.com wrote:
> > I'm having a problem with the SQL*Plus display of to_char queries and
> > am looking for some help. If I run select to_char
 (sysdate,'mm/dd/yyyy
> > hh:mi:ss') as "date" from dual, I get the following as the responce:
> >
> > date
> > ----------------------------------------------------------------------
 --
> > ---
> > 01/26/2001 12:24:39
> >
> > Does anyone know how to get the date to print w/o all of the extra
> > spaces/dashes? The date is displayed this way wether it is by itself,
> > or in the middle of a big select clause.
> >
> > Thanks for any help,
> >
> > wax_man
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >

>

> column "date" format a20
>

> --
> David Fitzjarrell
> Oracle Certified DBA
>
>

> Sent via Deja.com
> http://www.deja.com/

> Received on Sat Jan 27 2001 - 10:37:55 CST

Original text of this message

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