Forums Register Login

Date Conversion in SQL

+Pie Number of slices to send: Send
I need to enter both date and time in a table in Oracle in a column which is of type 'Date'. In the 'update table' query, I use the following for conversion:

to_date('dateString','yyyy-mm-dd hh24:mi:ss');

But I am getting this error:

ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string

I have googled for this query and found that it is perfectly alright.

The dateString will be a date viz. '2007-06-14 09:31:24.762'.

Any body has any inputs on this?

Thanks in Advance.
+Pie Number of slices to send: Send
Oracle specs expect an uppercase mask:
'YYYY-MM-DD HH24:MI:SS'

and you have to drop the .762. It does not match your SS mask.

Regards, Jan
[ June 14, 2007: Message edited by: Jan Cumps ]
Bring out your dead! Or a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1145 times.
Similar Threads
Has my compiler lost it?
Date issues!
Question about DateFormat class
DATE Problem
connot resolve symbol-variable calculate
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:03:36.