Herman Tan
2018-10-01 07:55:56 UTC
Hi,
I have a very puzzling error.
Try the following SQL statements.
What is the problem with '1982/01/01 00:01:00.000000000'?
Error message: Illegal instant due to time zone offset transition
select to_date('1981/12/31 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1981/12/31 11:59:59.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1982/01/01 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- fail
from (values(1))
select to_date('1982/01/01 00:00:01.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- fail
from (values(1))
select to_date('1982/01/01 00:01:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- fail
from (values(1))
select to_date('1982/01/01 01:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1982/01/02 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1983/01/01 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
Herman
I have a very puzzling error.
Try the following SQL statements.
What is the problem with '1982/01/01 00:01:00.000000000'?
Error message: Illegal instant due to time zone offset transition
select to_date('1981/12/31 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1981/12/31 11:59:59.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1982/01/01 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- fail
from (values(1))
select to_date('1982/01/01 00:00:01.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- fail
from (values(1))
select to_date('1982/01/01 00:01:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- fail
from (values(1))
select to_date('1982/01/01 01:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1982/01/02 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
select to_date('1983/01/01 00:00:00.000000000','yyyy/MM/dd
HH:mm:ss.SSSSSSSSS') -- pass
from (values(1))
Herman