Click to See Complete Forum and Search --> : date problem


rameshgiri26
06-07-2001, 11:30 AM
i have problem

can i able to enter date in this format if i set
nls_date_format = "YYYY-MM-DD HH24:MI:SS"
in INIT.ORA

when i am trying to insert the date into table problem

SQL>create table adate(dats date);
Table created
SQL>insert into adate values('2001-02-03 23:42:02');

ORA -01861 literal does not mach format string


RAMESH

rotem_fo
06-13-2001, 02:55 AM
Hi,
try using
alter session set NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
then use the insert into adate values('2001-02-03 23:42:02');

it works.