Re: [Q] Formatting query results

From: Steve Butler <sbut-is_at_seatimes.com>
Date: 1995/05/12
Message-ID: <Pine.SUN.3.91.950512083426.5818B-100000_at_seatimes>#1/1


On 7 May 1995, Mr Cartier Hung wrote:
> Is it possible to format the DATE field so that it can display as
> 'YYYYMMDD' and 24 hrs format?

Try this:

   Select ...... , to_char(date,'YYYYMMDD24HHMISS') from .....

That will return 12:21:30 pm on May 12, 1995 as: 19950512122130

Naturally, feel free to put editing in to make it readable! Perhaps

               'YYYY MM DD 24HH:MI:SS' to get 1995 05 12 12:21:30

--Steve

+----------------------------------------------------+
| Steve Butler          Voice:  206-464-2998         |
| The Seattle Times       Fax:  206-382-8898         |
| PO Box 70          Internet:  sbut-is_at_seatimes.com |
| Seattle, WA 98111    Packet:  KG7JE_at_N6EQZ.WA       |
+----------------------------------------------------+
All standard and non-standard disclaimers apply. All other sources are annonymous. Received on Fri May 12 1995 - 00:00:00 CEST

Original text of this message