-
When I select sysdate from dual, I get only first 2 digits of the year portion.
eg:
select sysdate from dual;
05-JUN-20
Logically it should be either 05-JUN-01 OR 05-JUN-2001
NLS_DATE_FORMAT is set as DD-MON-RRRR ( for DD-MON-YYYY also the result is the same)
I would appreciate your suggestion.
SPN
-
Would this provide a solution? It works on my machine.
select to_char(sysdate, 'DD-MON-YYYY') from dual;
David Knight
OCP DBA 8i, 9i, 10g
-
It's not working. Did you face similar probelm.
-
what does:
select to_char(sysdate,'mm/dd/yyyy hh24:mi:ss') from dual;
show?
Jeff Hunter
-
What kind of tool are you using for those queries? Is it a kind of GUI tool that displays the results in a grid? Is it possible that the field for your result in this grid is too narrow, so that only part of the whole string is displayed?
What is the result of the following:
SELECT TO_CHAR(SYSDATE), LENGTH(TO_CHAR(SYSDATE)) FROM dual;
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
I do not have an NLS_DATE_FORMAT set, but I have no problems.
What is the result when you use RRRR or YYYY? Both of those work fine for me.
David Knight
OCP DBA 8i, 9i, 10g
-
First alter the session.
SQL> alter session set nls_date_format='DD-MON-RRRR HH24:MI:SS';
Session altered.
SQL> SELECT SYSDATE FROM DUAL;
SYSDATE
--------------------
05-JUN-2001 11:36:47
-
Hi Friends,
Thanks to all. I tried all these but still the problem is the same. I am not using any GUI tool. It's coming on the OS prompt itself. It's on UNIX.
SPN
-
I know it may sound like a silly remark but
Have you checked the system time in unix using the 'date' command ?
Gert
-
looks like your date field is truncated.
- exist from sqlplus and login again
- check your login file
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
|