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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Date & Time Format

Re: Date & Time Format

From: Amine Y. Tarhini <atarhini_at_ringer.cs.utsa.edu>
Date: 1997/04/04
Message-ID: <5i3o9t$2t1@ring01.cs.utsa.edu>#1/1

In article <3343BBD2.12B1_at_adpc.purdue.edu> bwskiles_at_adpc.purdue.edu writes:
>Could someone please tell me what I'm doing wrong with the following?
>
>Here's the SQL:
>
>SELECT
> TO_CHAR(SYSDATE,'fmMonth ddth, YYYY, "at" HH:MI P.M.') TODAY
>FROM
> DUAL;
>
>Here's the results:
>
>TODAY
>----------------------------
>April 3rd, 1997, at 9:8 A.M.
>
>
>Notice the "9:8"? It should be "9:08". This only occurs when the the
>first digit of the minutes is a zero (0). For example, if I run the
>query 5 minutes later, it will correctly report the time as "9:13". I'm
>rather befuddled, because I really think I'm doing it right.
>
>TIA.
>
>--brad Skiles, dba
>Purdue University
>bwskiles_at_adpc.purdue.edu

  Use:
   TO_CHAR(SYSDATE,'fmMonth ddth, YYYY, "at" HH:fmMI P.M.') TODAY

                                                --
  This is explained in the SQL Language Reference Manual, under Format   Model Modifiers.
-- 
Amine.
atarhini_at_ringer.cs.utsa.edu

The above views are mine only ... etc. etc.
Received on Fri Apr 04 1997 - 00:00:00 CST

Original text of this message

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