Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: formatting output from a column in sql plus
"amwi" <amwi_at_yahoo.com> wrote in message news:<95NGc.98019$dP1.327068_at_newsc.telia.net>...
> I have read the documentation of the column command in sql plus version 10.1
> and i still don't understand how to format the data field as follows.
> I have tried different ways to use the column command, without success,
> believe me...
>
> Questions:
> 1) How to format a varchar2 field so that it is "right justified"?
> 2) How do i format a date field as follows 'YYYY-MM-DD' with the help of the
> column command, if possible?
>
> Thank you
You normally format dates in the select list of the query using the to_char function as in to_char(date_col,'YYYY-MM-DD') as label_name
HTH -- Mark D Powell -- Received on Wed Jul 07 2004 - 08:47:40 CDT