PL/SQL (MOSC)

MOSC Banner

Date conversion error

edited Jun 26, 2012 7:37AM in PL/SQL (MOSC) 3 commentsAnswered
Can someone please explain and suggest the solution for the date conversion error ? We are on 10203. The objective is to convert the date string through a procedure.

SQL> select TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') from dual;

TO_DATE('
---------
01-FEB-10

SQL> get c
  1  declare
  2     high_val      varchar2(200)     := 'TO_DATE('' 2010-02-01 00:00:00'', ''SYYYY-MM-DD HH24:MI:SS'', ''NLS_CALENDAR=GREGORIAN'')';
  3     date_val      date ;
  4  begin
  5  dbms_output.put_line('This is high val '||high_val);
  6  date_val := to_date(high_val,'DD-MON-YY') ;
  7  --dbms_output.put_line(date_val);
  8* end;
  9  /
This is high val TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')

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