Hi,
I am working on a pl/sql web application. I have a form on an html page w/some fields that allow the user to update/edit the fields. I have a DATE column in the database table that contains both the date and the time. I am having difficulty updating this field. I don't seem to have the correct syntax. I can't even update it using PL/SQL Developer or SQL Plus. This is what it looks like in the database:
7/11/2002 3:40:00 PM
When I attempt to update/add/edit, I have tried:
update instances
set start_backup_time = '01-MAR-2011 3:40:00 PM'
where instance_id = 45
BUT, I am able to update just the date portion by doing:
update instances
set start_backup_time = '01-MAR-2011'
where instance_id = 45
Why do I have to alter the format when I update? i.e. the data in the database looks like: 7/11/2002 3:40:00 PM, but if I attempt to update/edit/add by typing:
update instances
set start_backup_time = '7/11/2002'
where instance_id = 45 I get an 'ORA-01843 not a valid month' Error. thanks in advance!
I am working on a pl/sql web application. I have a form on an html page w/some fields that allow the user to update/edit the fields. I have a DATE column in the database table that contains both the date and the time. I am having difficulty updating this field. I don't seem to have the correct syntax. I can't even update it using PL/SQL Developer or SQL Plus. This is what it looks like in the database:
7/11/2002 3:40:00 PM
When I attempt to update/add/edit, I have tried:
update instances
set start_backup_time = '01-MAR-2011 3:40:00 PM'
where instance_id = 45
BUT, I am able to update just the date portion by doing:
update instances
set start_backup_time = '01-MAR-2011'
where instance_id = 45
Why do I have to alter the format when I update? i.e. the data in the database looks like: 7/11/2002 3:40:00 PM, but if I attempt to update/edit/add by typing:
update instances
set start_backup_time = '7/11/2002'
where instance_id = 45 I get an 'ORA-01843 not a valid month' Error. thanks in advance!