I'm trying to execute the following SQL:
INSERT INTO "x"
("x_id", "requested_function", "user_action", "t_users_id", "date", "wf_process", "details")
VALUES
('66', 'index', 'view', '1', '2011-02-04 22:14:19', '15', '');
..but i get this error : ORA-01861: literal does not match format string.
This error solved if i add the date format like this:
INSERT INTO "x"
("x_id", "requested_function", "user_action", "t_users_id", "date", "wf_process", "details")
VALUES
('66', 'index', 'view', '1',to_date('2011-02-04 22:14:19','yyyy-mm-dd hh24:mi:ss'), '15', '');
I don't want to define the date format for each SQL statement, I want this format to be standard for all date fields in the database, without the need to define it,in other word the first SQL statement must run correctly without any errors.
Can I define the date format for oracle database, so no need to define it again with each SQL statement?