SELECT TO_CHAR(SYSDATE,'hh24:mm:ss AM')
FROM DUAL
has returned
15:10:42 PM
....
a few minutes later, the same command has returned
15:10:01 PM
Why ?? Very strength !!! Any explanation?
Printable View
SELECT TO_CHAR(SYSDATE,'hh24:mm:ss AM')
FROM DUAL
has returned
15:10:42 PM
....
a few minutes later, the same command has returned
15:10:01 PM
Why ?? Very strength !!! Any explanation?
It is doing what is expected. If you want the month to appear as the minutes, keep using mm. Otherwise, use mi for minutes...
SQL> SELECT TO_CHAR(SYSDATE,'hh24:mm:ss AM')
2 FROM DUAL;
TO_CHAR(SYS
-----------
14:10:04 PM
SQL> ed
Wrote file afiedt.buf
1 SELECT TO_CHAR(SYSDATE,'hh24:mi:ss AM')
2* FROM DUAL
SQL> /
TO_CHAR(SYS
-----------
14:06:16 PM
OOOPS , Silly me. Thanks Steven. It solved.
I think everyone has done that at least once.
I don't know but many times our VB duhlopers have come to me complaining there is problem with the Oracle database date.Quote:
Originally posted by stecal
I think everyone has done that at least once.
:)
Sanjay