Discussion:
to_date?
(слишком старое сообщение для ответа)
Sergey Nilov
2003-07-21 16:01:04 UTC
Permalink
Hallo, All!
Мне необходимо перевести строковое представление даты '2003/04/01
08:01:02.000000' в тип даты что-то вроде
select to_date('2003/04/01 08:01:02.000000','yyyy/mm/dd hh:mm:ss') from
dual;
Получаю ошибка в строке 1:
ORA-01810: код формата появляется дважды
А как правильно?
С уважением Нилов Сергей
***@vikoil.dn.ua
Vitaliy Lyanchevskiy
2003-07-21 16:26:58 UTC
Permalink
Hello, Sergey!
21.07.2003 18:01, Sergey Nilov -> All:

SN> select to_date('2003/04/01 08:01:02.000000','yyyy/mm/dd hh:mm:ss') from
SN> dual;
SN> ORA-01810: код формата появляется дважды

RTFM SQL Reference -> Basic Elements of Oracle SQL ->
-> Format Models -> Date Format Models
select
to_date(substr('2003/04/01 08:01:02.000000',1,19),'yyyy/mm/dd hh:mi:ss'),
to_date('2003/04/01 08:01:02.000000','yyyy/mm/dd hh:mi:ss".xxxxxx"')
from dual;
--
WBR, Vitaliy Lyanchevskiy (E-Mail: ***@bisc.minsk.by)
Loading...