0
votes

i have used code update football_team set DOB='1991-06-07' where id=1; but it is giving error

ORA-01861: literal does not match format string

2
Can you add the table description please? Is DOB a date type? - Jens

2 Answers

1
votes

Try this way:

update football_team 
set DOB=TO_DATE('1991-06-07', 'yyyy-mm-dd') 
where id=1;
0
votes

it's because date FormatString not correct
try following

update football_team set DOB=TO_DATE('1991/06/07','yyyy/mm/dd') where id=1;

or your custom format