-
URGENT - to_char sysdate strength behaviour
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?
An ounce of prevention is worth a pound of cure
-
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.
An ounce of prevention is worth a pound of cure
-
I think everyone has done that at least once.
-
Originally posted by stecal
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.
Sanjay
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|