I want to insert this:
INSERT INTO NAVE (nume, clasa, anul_lansarii) values ('Ticonderoga','Ticonderoga',to_date('02/02/1930','mm/dd/yyyy') );
and gives me the error:
1305 - FUNCTION proiect.to_date does not exist
I want to insert this:
INSERT INTO NAVE (nume, clasa, anul_lansarii) values ('Ticonderoga','Ticonderoga',to_date('02/02/1930','mm/dd/yyyy') );
and gives me the error:
1305 - FUNCTION proiect.to_date does not exist
There is no to_date()
function in MySql but you can use str_to_date()
:
str_to_date('02/02/1930','%m/%d/%Y')
See the demo.
to_date
is not default mysql function.
But from your question i think you can use STR_TO_DATE
function. like this:
INSERT INTO NAVE (nume, clasa, anul_lansarii) values ('Ticonderoga','Ticonderoga',STR_TO_DATE('02/02/1930','mm/dd/yyyy') );