Re: How to get time from Oracle?

From: Adrian G. Klingel <klingela_at_nospam.nt.com>
Date: 1998/02/19
Message-ID: <34EC7EBF.B83EB996_at_nospam.nt.com>#1/1


Jimmy,

     You've got the format wrong. 'MM' stands for a 2 digit month. You'll notice that February is the second month of the year, so '02' is coming back. Change 'MM' to 'MI'. MI is the correct format for minutes in Oracle. This is a common coding mistake, since it does not return an Oracle error. Hope this helps.

Adrian Klingel
Consultant

Jimmy wrote:

> Hello all,
>
> I want to get system time from the Oracle. I use "select
> to_char(sysdate, 'HH:MM:SS') from dual" in the SQL*PLUS. The first
> result was "02:02:50". Later, I typed the above command again and the
> result was "02:02:55". However, when I typed the command a few second
> later, the result was "02:02:02". Why the system time seems running in
> cycle? Also, is the sysdate function get time from the UNIX OS? (Oracle
> is running on UNIX) If I want to change the system time in Oracle, how
> can I do that?
>
> THanks,
> Jimmy
Received on Thu Feb 19 1998 - 00:00:00 CET

Original text of this message