Database Administration (MOSC)

MOSC Banner

Inserting sysdate with default NLS_DATE_FORMAT

edited Aug 31, 2020 10:16PM in Database Administration (MOSC) 10 commentsAnswered

Hi Expert,

I'm trying to get my head around how SYSDATE works , my default NLS_DATE_FORMAT is DD-MON-RR

SQL> select value from NLS_SESSION_PARAMETERS where PARAMETER='NLS_DATE_FORMAT';

VALUE

--------------------------------------------------------------------------------

DD-MON-RR

I inserted values with sysdate

SQL>  INSERT INTO t1 VALUES (TRUNC(SYSDATE), SYSDATE);

1 row created.

How Oracle is able to insert SYSDATE with time frame when the default NLS_DATE_FORMAT is DD-MON-RR ??

I tried to insert a value with time-field in it, but it failed with ORA-01830: date format picture ends before converting entire input string.

I was expecting the same error for sysdate as well

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center