Home » SQL & PL/SQL » SQL & PL/SQL » Re: ToDate function (split from hijacked thread http://www.orafaq.com/forum/t/56308/ by bb)
Re: ToDate function (split from hijacked thread http://www.orafaq.com/forum/t/56308/ by bb) [message #661738] Thu, 30 March 2017 03:20 Go to next message
hyder
Messages: 1
Registered: March 2017
Junior Member

Hi

can anyone please help on the below command

select to_Date('2014050110590942', 'YYYYMMDDHHMISSSS')
from dual

it errors out

ERROR at line 1:
ORA-01810: format code appears twice


thanks

Re: ToDate function [message #661742 is a reply to message #661738] Thu, 30 March 2017 03:33 Go to previous messageGo to next message
cookiemonster
Messages: 12995
Registered: September 2008
Location: Rainy Manchester
Senior Member
you've got seconds - SS - twice.
If you want fractional seconds you need to use a timestamp not a date.
Re: ToDate function [message #661770 is a reply to message #661742] Fri, 31 March 2017 11:41 Go to previous message
Bill B
Messages: 1709
Registered: December 2004
Senior Member
select to_TIMESTAMP('2014050110590942', 'YYYYMMDDHH24MISSFF')
from dual
Previous Topic: UTL_FILE_DIR
Next Topic: oracle-dbms-fga-dynamically-create-an-audit-trail-or-policy (3 threads merged by bb)
Goto Forum:
  


Current Time: Tue Jan 23 11:15:24 CST 2018

Total time taken to generate the page: 0.01415 seconds